[][src]Trait webthing::server::ActionGenerator

pub trait ActionGenerator: Send + Sync {
    fn generate(
        &self,
        thing: Weak<RwLock<Box<dyn Thing>>>,
        name: String,
        input: Option<&Value>
    ) -> Option<Box<dyn Action>>; }

Generator for new actions, based on name.

Required methods

fn generate(
    &self,
    thing: Weak<RwLock<Box<dyn Thing>>>,
    name: String,
    input: Option<&Value>
) -> Option<Box<dyn Action>>

Generate a new action, if possible.

Arguments

  • thing - thing associated with this action
  • name - name of the requested action
  • input - input for the action
Loading content...

Implementors

Loading content...