Struct webthing::action::BaseAction
source · [−]pub struct BaseAction { /* private fields */ }
Expand description
Basic action implementation.
An Action represents an individual action which can be performed on a thing.
This can easily be used by other actions to handle most of the boring work.
Implementations
Trait Implementations
sourceimpl Action for BaseAction
impl Action for BaseAction
An Action represents an individual action on a thing.
sourcefn set_href_prefix(&mut self, prefix: String)
fn set_href_prefix(&mut self, prefix: String)
Set the prefix of any hrefs associated with this action.
sourcefn get_status(&self) -> String
fn get_status(&self) -> String
Get this action’s status.
sourcefn get_thing(&self) -> Option<Arc<RwLock<Box<dyn Thing>>>>
fn get_thing(&self) -> Option<Arc<RwLock<Box<dyn Thing>>>>
Get the thing associated with this action.
sourcefn get_time_requested(&self) -> String
fn get_time_requested(&self) -> String
Get the time the action was requested.
sourcefn get_time_completed(&self) -> Option<String>
fn get_time_completed(&self) -> Option<String>
Get the time the action was completed.
sourcefn set_status(&mut self, status: String)
fn set_status(&mut self, status: String)
Set the status of this action.
sourcefn perform_action(&mut self)
fn perform_action(&mut self)
Override this with the code necessary to perform the action.
Auto Trait Implementations
impl RefUnwindSafe for BaseAction
impl Send for BaseAction
impl Sync for BaseAction
impl Unpin for BaseAction
impl UnwindSafe for BaseAction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more