[−][src]Trait webthing::action::Action
High-level Action trait.
Required methods
pub fn set_href_prefix(&mut self, prefix: String)
[src]
Set the prefix of any hrefs associated with this action.
pub fn get_id(&self) -> String
[src]
Get this action's ID.
pub fn get_name(&self) -> String
[src]
Get this action's name.
pub fn get_href(&self) -> String
[src]
Get this action's href.
pub fn get_status(&self) -> String
[src]
Get this action's status.
pub fn get_thing(&self) -> Option<Arc<RwLock<Box<dyn Thing>>>>
[src]
Get the thing associated with this action.
pub fn get_time_requested(&self) -> String
[src]
Get the time the action was requested.
pub fn get_time_completed(&self) -> Option<String>
[src]
Get the time the action was completed.
pub fn get_input(&self) -> Option<Map<String, Value>>
[src]
Get the inputs for this action.
pub fn set_status(&mut self, status: String)
[src]
Set the status of this action.
pub fn start(&mut self)
[src]
Start performing the action.
pub fn perform_action(&mut self)
[src]
Override this with the code necessary to perform the action.
pub fn cancel(&mut self)
[src]
Override this with the code necessary to cancel the action.
pub fn finish(&mut self)
[src]
Finish performing the action.
Provided methods
pub fn as_action_description(&self) -> Map<String, Value>
[src]
Get the action description.
Returns a JSON map describing the action.
Implementors
impl Action for BaseAction
[src]
An Action represents an individual action on a thing.
pub fn set_href_prefix(&mut self, prefix: String)
[src]
Set the prefix of any hrefs associated with this action.
pub fn get_id(&self) -> String
[src]
Get this action's ID.
pub fn get_name(&self) -> String
[src]
Get this action's name.
pub fn get_href(&self) -> String
[src]
Get this action's href.
pub fn get_status(&self) -> String
[src]
Get this action's status.
pub fn get_thing(&self) -> Option<Arc<RwLock<Box<dyn Thing>>>>
[src]
Get the thing associated with this action.
pub fn get_time_requested(&self) -> String
[src]
Get the time the action was requested.
pub fn get_time_completed(&self) -> Option<String>
[src]
Get the time the action was completed.
pub fn get_input(&self) -> Option<Map<String, Value>>
[src]
Get the inputs for this action.
pub fn set_status(&mut self, status: String)
[src]
Set the status of this action.
pub fn start(&mut self)
[src]
Start performing the action.
pub fn perform_action(&mut self)
[src]
Override this with the code necessary to perform the action.
pub fn cancel(&mut self)
[src]
Override this with the code necessary to cancel the action.
pub fn finish(&mut self)
[src]
Finish performing the action.