summaryrefslogtreecommitdiffstats
path: root/crates/core
diff options
context:
space:
mode:
authorMarcel Müller <m.mueller@ifm.com>2022-02-10 14:56:26 +0100
committerMatthias Beyer <matthias.beyer@ifm.com>2022-03-04 15:03:53 +0100
commita2abd1844b05682b47b51ef85df198683ff4b03c (patch)
tree1057a768e7497a0c775aac46328e75d7ce01454c /crates/core
parent517c4bf19ea5c059d0043076a7ac7e823567ec6a (diff)
Rename PluginBuilder::name to kind_name
This makes it clearer on what name refers to here. As both in the config and in the plugin builder you'd have a 'name' property. Renaming this to 'kind name' makes it clear which part it refers to. Signed-off-by: Marcel Müller <m.mueller@ifm.com> Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
Diffstat (limited to 'crates/core')
-rw-r--r--crates/core/tedge_api/examples/heartbeat.rs2
-rw-r--r--crates/core/tedge_api/src/plugins.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/core/tedge_api/examples/heartbeat.rs b/crates/core/tedge_api/examples/heartbeat.rs
index 7776e488..cac8b973 100644
--- a/crates/core/tedge_api/examples/heartbeat.rs
+++ b/crates/core/tedge_api/examples/heartbeat.rs
@@ -10,7 +10,7 @@ struct HeartbeatServiceBuilder;
#[async_trait]
impl PluginBuilder for HeartbeatServiceBuilder {
- fn name(&self) -> &'static str {
+ fn kind_name(&self) -> &'static str {
todo!()
}
diff --git a/crates/core/tedge_api/src/plugins.rs b/crates/core/tedge_api/src/plugins.rs
index 78cb3356..7d23c8bf 100644
--- a/crates/core/tedge_api/src/plugins.rs
+++ b/crates/core/tedge_api/src/plugins.rs
@@ -38,8 +38,8 @@ pub type PluginConfiguration = toml::Spanned<toml::value::Value>;
/// A plugin builder for a given plugin
#[async_trait]
pub trait PluginBuilder: Sync + Send + 'static {
- /// The name of the plugins this creates, this should be unique and will prevent startup otherwise
- fn name(&self) -> &'static str;
+ /// The a name for the kind of plugins this creates, this should be unique and will prevent startup otherwise
+ fn kind_name(&self) -> &'static str;
/// This may be called anytime to verify whether a plugin could be instantiated with the
/// passed configuration.