refactor: move most of the horrible add_module macro content into proper functions
This commit is contained in:
@@ -21,7 +21,7 @@ pub struct ScriptModule {
|
||||
interval: u64,
|
||||
|
||||
#[serde(flatten)]
|
||||
pub common: CommonConfig,
|
||||
pub common: Option<CommonConfig>,
|
||||
}
|
||||
|
||||
/// `Mode::Poll`
|
||||
@@ -48,6 +48,10 @@ impl Module<Label> for ScriptModule {
|
||||
type SendMessage = String;
|
||||
type ReceiveMessage = ();
|
||||
|
||||
fn name() -> &'static str {
|
||||
"script"
|
||||
}
|
||||
|
||||
fn spawn_controller(
|
||||
&self,
|
||||
_info: &ModuleInfo,
|
||||
|
||||
Reference in New Issue
Block a user