Struct barley_runtime::ContextCallbacks
source · pub struct ContextCallbacks {
pub on_action_started: Option<fn(_: ActionObject)>,
pub on_action_finished: Option<fn(_: ActionObject)>,
pub on_action_failed: Option<fn(_: ActionObject, _: &Error)>,
}Expand description
Callbacks for the context.
These callbacks are set by interfaces, and are usually not set by scripts directly.
Fields§
§on_action_started: Option<fn(_: ActionObject)>Called when an action is started.
on_action_finished: Option<fn(_: ActionObject)>Called when an action is completed successfully.
on_action_failed: Option<fn(_: ActionObject, _: &Error)>Called when an action fails.
Trait Implementations§
source§impl Clone for ContextCallbacks
impl Clone for ContextCallbacks
source§fn clone(&self) -> ContextCallbacks
fn clone(&self) -> ContextCallbacks
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 moresource§impl Default for ContextCallbacks
impl Default for ContextCallbacks
source§fn default() -> ContextCallbacks
fn default() -> ContextCallbacks
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ContextCallbacks
impl Send for ContextCallbacks
impl Sync for ContextCallbacks
impl Unpin for ContextCallbacks
impl UnwindSafe for ContextCallbacks
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