pub struct AutoCompleteAsyncPopulator(/* private fields */);Expand description
The asynchronous populator of an AutoCompleteBox: given the search
text and a cancellation token it produces the items for the drop-down.
The future is driven by the dispatcher of the control.
A populator is a reference: copies compare equal to what they were copied from.
Implementations§
Source§impl AutoCompleteAsyncPopulator
impl AutoCompleteAsyncPopulator
Sourcepub fn new(
populator: impl Fn(Option<String>, CancellationToken) -> AutoCompletePopulation + 'static,
) -> Self
pub fn new( populator: impl Fn(Option<String>, CancellationToken) -> AutoCompletePopulation + 'static, ) -> Self
Wraps a populator function.
Sourcepub fn invoke(
&self,
search_text: Option<String>,
cancellation_token: CancellationToken,
) -> AutoCompletePopulation
pub fn invoke( &self, search_text: Option<String>, cancellation_token: CancellationToken, ) -> AutoCompletePopulation
Calls the populator.
Trait Implementations§
Source§impl Clone for AutoCompleteAsyncPopulator
impl Clone for AutoCompleteAsyncPopulator
Auto Trait Implementations§
impl !RefUnwindSafe for AutoCompleteAsyncPopulator
impl !Send for AutoCompleteAsyncPopulator
impl !Sync for AutoCompleteAsyncPopulator
impl !UnwindSafe for AutoCompleteAsyncPopulator
impl Freeze for AutoCompleteAsyncPopulator
impl Unpin for AutoCompleteAsyncPopulator
impl UnsafeUnpin for AutoCompleteAsyncPopulator
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more