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

pub trait ActionGenerator: Send + Sync {
    pub 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

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

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...