pub struct ContextCallbacks {
pub on_action_started: Option<fn(ActionObject)>,
pub on_action_finished: Option<fn(ActionObject)>,
pub on_action_failed: Option<fn(ActionObject, &ActionError)>,
}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, &ActionError)>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 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 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 Freeze for ContextCallbacks
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