pub trait DropdownItem: Clone {
type Value: Clone;
// Required methods
fn title(&self) -> SharedString;
fn value(&self) -> &Self::Value;
// Provided methods
fn display_title(&self) -> Option<AnyElement> { ... }
fn matches(&self, query: &str) -> bool { ... }
}
Expand description
A trait for items that can be displayed in a dropdown.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn display_title(&self) -> Option<AnyElement>
fn display_title(&self) -> Option<AnyElement>
Customize the display title used to selected item in Dropdown Input.
If return None, the title will be used.
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.