pub trait SelectDelegate: Sized {
type Item: SelectItem;
// Required methods
fn items_count(&self, section: usize) -> usize;
fn item(&self, ix: IndexPath) -> Option<&Self::Item>;
fn position<V>(&self, _value: &V) -> Option<IndexPath>
where Self::Item: SelectItem<Value = V>,
V: PartialEq;
// Provided methods
fn sections_count(&self, _: &App) -> usize { ... }
fn section(&self, _section: usize) -> Option<AnyElement> { ... }
fn perform_search(
&mut self,
_query: &str,
_window: &mut Window,
_: &mut Context<'_, SelectState<Self>>,
) -> Task<()> { ... }
}Required Associated Types§
type Item: SelectItem
Required Methods§
Sourcefn items_count(&self, section: usize) -> usize
fn items_count(&self, section: usize) -> usize
Returns the number of items in the given section.
Provided Methods§
Sourcefn sections_count(&self, _: &App) -> usize
fn sections_count(&self, _: &App) -> usize
Returns the number of sections in the Select.
Sourcefn section(&self, _section: usize) -> Option<AnyElement>
fn section(&self, _section: usize) -> Option<AnyElement>
Returns the section header element for the given section index.
fn perform_search( &mut self, _query: &str, _window: &mut Window, _: &mut Context<'_, SelectState<Self>>, ) -> Task<()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.