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§
Source§impl Action for BaseAction
An Action represents an individual action on a thing.
impl Action for BaseAction
An Action represents an individual action on a thing.
Source§fn 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.
Source§fn get_status(&self) -> String
fn get_status(&self) -> String
Get this action’s status.
Source§fn 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.
Source§fn get_time_requested(&self) -> String
fn get_time_requested(&self) -> String
Get the time the action was requested.
Source§fn get_time_completed(&self) -> Option<String>
fn get_time_completed(&self) -> Option<String>
Get the time the action was completed.
Source§fn set_status(&mut self, status: String)
fn set_status(&mut self, status: String)
Set the status of this action.
Source§fn perform_action(&mut self)
fn perform_action(&mut self)
Override this with the code necessary to perform the action.
Auto Trait Implementations§
impl Freeze for BaseAction
impl RefUnwindSafe for BaseAction
impl Send for BaseAction
impl Sync for BaseAction
impl Unpin for BaseAction
impl UnwindSafe for BaseAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more