Struct barley_runtime::ActionObject
source · 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.
Trait Implementations§
source§impl Clone for ActionObject
impl Clone for ActionObject
source§fn clone(&self) -> ActionObject
fn clone(&self) -> ActionObject
Returns a copy 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 !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