AutoCompleteFilterPredicate
struct · ferroui-controls · v0.5.0
struct AutoCompleteFilterPredicate<T: 'static>
Represents the filter used by the AutoCompleteBox control to
determine whether an item is a possible match for the specified text.
The function takes the string used as the basis for filtering and the
item that is compared with it, and returns true to indicate the item
is a possible match. T is the type used for filtering: the text form
of an item (Option<String>) or the item itself
(Option<BoxedValue>).
A filter is a reference: copies compare equal to what they were copied from, two filters made from the same function do not.
Members
new
fn new(filter: impl Fn(Option<&str>, &T) -> bool + 'static) -> Self
Wraps a filter function.
invoke
fn invoke(self: &Self, search: Option<&str>, item: &T) -> bool
Calls the filter.
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.