pub struct PaletteCommand<Msg> { /* private fields */ }Expand description
One command of a CommandPalette.
Implementations§
Source§impl<Msg> PaletteCommand<Msg>
impl<Msg> PaletteCommand<Msg>
Sourcepub fn new(
id: impl Into<String>,
label: impl Into<String>,
message: Msg,
) -> Self
pub fn new( id: impl Into<String>, label: impl Into<String>, message: Msg, ) -> Self
A command named label that sends message; id identifies it for
CommandPalette::recent and CommandPalette::on_run.
Auto Trait Implementations§
impl<Msg> Freeze for PaletteCommand<Msg>where
Msg: Freeze,
impl<Msg> RefUnwindSafe for PaletteCommand<Msg>where
Msg: RefUnwindSafe,
impl<Msg> Send for PaletteCommand<Msg>where
Msg: Send,
impl<Msg> Sync for PaletteCommand<Msg>where
Msg: Sync,
impl<Msg> Unpin for PaletteCommand<Msg>where
Msg: Unpin,
impl<Msg> UnsafeUnpin for PaletteCommand<Msg>where
Msg: UnsafeUnpin,
impl<Msg> UnwindSafe for PaletteCommand<Msg>where
Msg: UnwindSafe,
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> 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