pub struct CommandHandle { /* private fields */ }Expand description
A handle to a Command subscription.
Holding the command handle indicates that the command is relevant in the current app state. The handle also needs to be enabled to indicate that the command primary action can be executed.
You can use the Command::subscribe method in a command type to create a handle.
Implementations§
Source§impl CommandHandle
impl CommandHandle
Sourcepub fn enabled(&self) -> &Var<bool>
pub fn enabled(&self) -> &Var<bool>
Variable that gets and sets if this specific handle is enabled.
The Command::is_enabled is true if any handle is enabled.
Trait Implementations§
Source§impl Clone for CommandHandle
Clone the handle.
impl Clone for CommandHandle
Clone the handle.
Note that the cloned handle will have its own enabled state, disconnected from this handle.
Source§impl Debug for CommandHandle
impl Debug for CommandHandle
Source§impl Default for CommandHandle
impl Default for CommandHandle
Auto Trait Implementations§
impl !Freeze for CommandHandle
impl !RefUnwindSafe for CommandHandle
impl Send for CommandHandle
impl Sync for CommandHandle
impl !Unpin for CommandHandle
impl !UnwindSafe for CommandHandle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more