pub struct CommandTriggered {
pub id: CommandId,
pub source: CommandSource,
}Expand description
Event emitted when a command is triggered.
The app receives a Vec<CommandTriggered> (or handles them one-by-one)
and converts them into domain AppCommand variants.
Fields§
§id: CommandIdWhich command fired.
source: CommandSourceHow it was triggered.
Implementations§
Source§impl CommandTriggered
impl CommandTriggered
Sourcepub fn new(id: CommandId, source: CommandSource) -> Self
pub fn new(id: CommandId, source: CommandSource) -> Self
Creates a CommandTriggered event from a command id and its trigger source.
Trait Implementations§
Source§impl Clone for CommandTriggered
impl Clone for CommandTriggered
Source§fn clone(&self) -> CommandTriggered
fn clone(&self) -> CommandTriggered
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 CommandTriggered
impl RefUnwindSafe for CommandTriggered
impl Send for CommandTriggered
impl Sync for CommandTriggered
impl Unpin for CommandTriggered
impl UnsafeUnpin for CommandTriggered
impl UnwindSafe for CommandTriggered
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