pub struct ActionState {
pub badge: Option<String>,
pub toggles: bool,
pub shortcut: Option<String>,
}Expand description
What an action’s row shows of the state the action acts on, beside its label: data, never drawing code. Every surface that lists the action (the palette, a menu, an agent’s listing) reads the same.
Fields§
§badge: Option<String>A short live status (“On”, “Current”).
toggles: boolThe action flips the state its badge shows, so choosing it keeps the list it was chosen from open on the new state.
shortcut: Option<String>The keys that do the same, spelled as the keyboard layout in use reads them.
Implementations§
Trait Implementations§
Source§impl Clone for ActionState
impl Clone for ActionState
Source§impl Debug for ActionState
impl Debug for ActionState
Source§impl Default for ActionState
impl Default for ActionState
Source§impl<'de> Deserialize<'de> for ActionStatewhere
ActionState: Default,
impl<'de> Deserialize<'de> for ActionStatewhere
ActionState: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ActionState
Source§impl PartialEq for ActionState
impl PartialEq for ActionState
Source§impl Serialize for ActionState
impl Serialize for ActionState
impl StructuralPartialEq for ActionState
Auto Trait Implementations§
impl Forget for ActionState
impl Freeze for ActionState
impl Move for ActionState
impl RefUnwindSafe for ActionState
impl Send for ActionState
impl Sync for ActionState
impl Unpin for ActionState
impl UnsafeUnpin for ActionState
impl UnwindSafe for ActionState
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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