pub struct ActionObject { /* private fields */ }Expand description
A usable action object.
This struct is used by actions to store their dependencies and identification. It should not be constructed directly, unless you are writing a custom Action.
Implementations§
Source§impl ActionObject
impl ActionObject
Sourcepub fn new(action: Arc<dyn Action>) -> Self
pub fn new(action: Arc<dyn Action>) -> Self
Create a new action object.
This method should not be called directly, unless you are writing a custom Action.
Sourcepub fn display_name(&self) -> String
pub fn display_name(&self) -> String
Get the display name of the action.
Sourcepub fn requires(&mut self, action: ActionObject)
pub fn requires(&mut self, action: ActionObject)
Add a dependency to the action.
Sourcepub async fn load_state(&self, builder: &mut RuntimeBuilder)
pub async fn load_state(&self, builder: &mut RuntimeBuilder)
Load the state
Trait Implementations§
Source§impl Clone for ActionObject
impl Clone for ActionObject
Source§fn clone(&self) -> ActionObject
fn clone(&self) -> ActionObject
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ActionObject
impl !RefUnwindSafe for ActionObject
impl Send for ActionObject
impl Sync for ActionObject
impl Unpin for ActionObject
impl !UnwindSafe for ActionObject
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