AutoCompleteSelector
struct · ferroui-controls · v0.5.0
struct AutoCompleteSelector<T: 'static>
Represents the selector used by the AutoCompleteBox control to
determine how the specified text should be modified with an item.
The function takes the string used as the basis for filtering and the
selected item that should be combined with it, and returns the modified
text that will be used by the control. T is the type used for
selecting: the text form of an item (Option<String>) or the item
itself (BoxedValue).
A selector is a reference: copies compare equal to what they were copied from, two selectors made from the same function do not.
Members
new
fn new(selector: impl Fn(Option<&str>, &T) -> String + 'static) -> Self
Wraps a selector function.
invoke
fn invoke(self: &Self, search: Option<&str>, item: &T) -> String
Calls the selector.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherClonePartialEq
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.