pub trait Action: Send + Sync {
Show 15 methods fn set_href_prefix(&mut self, prefix: String); fn get_id(&self) -> String; fn get_name(&self) -> String; fn get_href(&self) -> String; fn get_status(&self) -> String; fn get_thing(&self) -> Option<Arc<RwLock<Box<dyn Thing>>>>; fn get_time_requested(&self) -> String; fn get_time_completed(&self) -> Option<String>; fn get_input(&self) -> Option<Map<String, Value>>; fn set_status(&mut self, status: String); fn start(&mut self); fn perform_action(&mut self); fn cancel(&mut self); fn finish(&mut self); fn as_action_description(&self) -> Map<String, Value> { ... }
}
Expand description

High-level Action trait.

Required Methods

Set the prefix of any hrefs associated with this action.

Get this action’s ID.

Get this action’s name.

Get this action’s href.

Get this action’s status.

Get the thing associated with this action.

Get the time the action was requested.

Get the time the action was completed.

Get the inputs for this action.

Set the status of this action.

Start performing the action.

Override this with the code necessary to perform the action.

Override this with the code necessary to cancel the action.

Finish performing the action.

Provided Methods

Get the action description.

Returns a JSON map describing the action.

Implementors

An Action represents an individual action on a thing.