Struct CommandRow
pub struct CommandRow {
pub description_is_path: bool,
pub facts: Vec<String>,
pub image: Option<AppImage>,
pub avatar: Option<(String, String)>,
pub badge: Option<String>,
pub keycaps: Option<Vec<String>>,
pub faces: Vec<RowFace>,
pub outcome: Option<String>,
pub alternates: Vec<Alternate>,
}Expand description
The slots of a SearchRow::Command row beyond its title, subtitle and
icon.
Fields§
§description_is_path: boolThe description is a path, so it loses its middle rather than its end when it doesn’t fit. Prose loses its end.
facts: Vec<String>The description (the result’s subtitle) as separate facts, drawn as runs of their own with space between them. Empty: one run.
image: Option<AppImage>The application’s own artwork, painted in place of the icon when it decodes.
avatar: Option<(String, String)>A person as (name, key): their avatar in place of the icon.
badge: Option<String>A short status, as a trailing pill.
keycaps: Option<Vec<String>>A shortcut’s keycap legends, as a trailing chip.
faces: Vec<RowFace>The people the row is about, as a stack of faces at its end.
outcome: Option<String>What choosing the row does, as a button at its end (“Join”).
alternates: Vec<Alternate>Other activations behind a held modifier; the selected row shows the one whose modifier is down, else the first as a hint.
Implementations§
§impl CommandRow
impl CommandRow
pub fn shown_alternate(
&self,
held: Option<ActivationModifier>,
) -> Option<&Alternate>
pub fn shown_alternate( &self, held: Option<ActivationModifier>, ) -> Option<&Alternate>
The alternative the selected row shows: the one whose modifier is
held, else the first it offers.
Trait Implementations§
§impl Clone for CommandRow
impl Clone for CommandRow
§fn clone(&self) -> CommandRow
fn clone(&self) -> CommandRow
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for CommandRow
impl Debug for CommandRow
§impl Default for CommandRow
impl Default for CommandRow
§fn default() -> CommandRow
fn default() -> CommandRow
§impl PartialEq for CommandRow
impl PartialEq for CommandRow
impl StructuralPartialEq for CommandRow
Auto Trait Implementations§
impl Freeze for CommandRow
impl !RefUnwindSafe for CommandRow
impl Send for CommandRow
impl Sync for CommandRow
impl Unpin for CommandRow
impl UnsafeUnpin for CommandRow
impl !UnwindSafe for CommandRow
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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>
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>
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