pub struct Suggestion {
pub id: Option<String>,
pub text: String,
pub detail: Option<String>,
pub icon: Option<Icon>,
pub keys: Option<Vec<String>>,
}Expand description
A prompt of a suggestions node.
Fields§
§id: Option<String>What activate names (default the text).
text: StringThe prompt as shown.
detail: Option<String>rows: muted after the text; cards: the line under it; chips:
the tooltip.
icon: Option<Icon>The leading icon.
keys: Option<Vec<String>>rows: the keycaps at the right (default the item’s number; empty
for none).
Implementations§
Source§impl Suggestion
impl Suggestion
Sourcepub fn keys<K: Into<String>>(self, keys: impl IntoIterator<Item = K>) -> Self
pub fn keys<K: Into<String>>(self, keys: impl IntoIterator<Item = K>) -> Self
Sets the keycaps (rows).
Trait Implementations§
Source§impl Clone for Suggestion
impl Clone for Suggestion
Source§impl Debug for Suggestion
impl Debug for Suggestion
Source§impl Default for Suggestion
impl Default for Suggestion
impl Eq for Suggestion
Source§impl PartialEq for Suggestion
impl PartialEq for Suggestion
Source§impl Serialize for Suggestion
impl Serialize for Suggestion
impl StructuralPartialEq for Suggestion
Auto Trait Implementations§
impl Freeze for Suggestion
impl RefUnwindSafe for Suggestion
impl Send for Suggestion
impl Sync for Suggestion
impl Unpin for Suggestion
impl UnsafeUnpin for Suggestion
impl UnwindSafe for Suggestion
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.