pub struct AutocompleteEdit<'a> { /* private fields */ }Expand description
A text input with autocomplete suggestions
Implementations§
Source§impl<'a> AutocompleteEdit<'a>
impl<'a> AutocompleteEdit<'a>
Sourcepub fn new(
text: &'a mut String,
suggestions: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn new( text: &'a mut String, suggestions: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Create a new autocomplete edit with the given text and suggestions
Sourcepub fn placeholder(self, placeholder: impl Into<String>) -> Self
pub fn placeholder(self, placeholder: impl Into<String>) -> Self
Set the placeholder text
Sourcepub fn max_suggestions(self, max: usize) -> Self
pub fn max_suggestions(self, max: usize) -> Self
Set the maximum number of suggestions to show
Sourcepub fn case_sensitive(self, sensitive: bool) -> Self
pub fn case_sensitive(self, sensitive: bool) -> Self
Set whether matching should be case-sensitive
Sourcepub fn show(self, ui: &mut Ui) -> AutocompleteResponse
pub fn show(self, ui: &mut Ui) -> AutocompleteResponse
Show the autocomplete widget
Auto Trait Implementations§
impl<'a> !UnwindSafe for AutocompleteEdit<'a>
impl<'a> Freeze for AutocompleteEdit<'a>
impl<'a> RefUnwindSafe for AutocompleteEdit<'a>
impl<'a> Send for AutocompleteEdit<'a>
impl<'a> Sync for AutocompleteEdit<'a>
impl<'a> Unpin for AutocompleteEdit<'a>
impl<'a> UnsafeUnpin for AutocompleteEdit<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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