pub struct AutoComplete<T: PartialOrd + Ord + Clone + Default> { /* private fields */ }Expand description
The AutoComplete struct, basically wrapper around [Node]
Implementations§
Source§impl<T> AutoComplete<T>
impl<T> AutoComplete<T>
Sourcepub fn new(dict: &[(String, T)]) -> Self
pub fn new(dict: &[(String, T)]) -> Self
Create a new AutoComplete with pre-defined strings to autocomplete
Sourcepub fn insert(&mut self, value: &(&str, T))
pub fn insert(&mut self, value: &(&str, T))
Insert a string into the AutoComplete struct to autocomplete it
Trait Implementations§
Source§impl<T: Default + PartialOrd + Ord + Clone + Default> Default for AutoComplete<T>
impl<T: Default + PartialOrd + Ord + Clone + Default> Default for AutoComplete<T>
Source§fn default() -> AutoComplete<T>
fn default() -> AutoComplete<T>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<T> Freeze for AutoComplete<T>where
T: Freeze,
impl<T> RefUnwindSafe for AutoComplete<T>where
T: RefUnwindSafe,
impl<T> Send for AutoComplete<T>where
T: Send,
impl<T> Sync for AutoComplete<T>where
T: Sync,
impl<T> Unpin for AutoComplete<T>where
T: Unpin,
impl<T> UnwindSafe for AutoComplete<T>where
T: UnwindSafe + RefUnwindSafe,
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