pub struct AutocompleteItem {
pub value: String,
pub label: String,
pub description: Option<String>,
}Expand description
pi-tui’s AutocompleteItem. An item without a label shows its value.
Fields§
§value: StringWhat the item inserts.
label: StringWhat the list shows.
description: Option<String>Shown next to the label.
Implementations§
Source§impl AutocompleteItem
impl AutocompleteItem
Sourcepub fn new(value: impl Into<String>) -> AutocompleteItem
pub fn new(value: impl Into<String>) -> AutocompleteItem
An item that shows its value.
Trait Implementations§
Source§impl Clone for AutocompleteItem
impl Clone for AutocompleteItem
Source§impl Debug for AutocompleteItem
impl Debug for AutocompleteItem
Source§impl<'de> Deserialize<'de> for AutocompleteItem
impl<'de> Deserialize<'de> for AutocompleteItem
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 AutocompleteItem
Source§impl PartialEq for AutocompleteItem
impl PartialEq for AutocompleteItem
Source§impl Serialize for AutocompleteItem
impl Serialize for AutocompleteItem
impl StructuralPartialEq for AutocompleteItem
Auto Trait Implementations§
impl Freeze for AutocompleteItem
impl RefUnwindSafe for AutocompleteItem
impl Send for AutocompleteItem
impl Sync for AutocompleteItem
impl Unpin for AutocompleteItem
impl UnsafeUnpin for AutocompleteItem
impl UnwindSafe for AutocompleteItem
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<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.