pub trait Item:
Send
+ Sync
+ Debug {
// Required methods
fn filter_value(&self) -> String;
fn box_clone(&self) -> Box<dyn Item + Send + Sync>;
fn as_any(&self) -> &dyn Any;
// Provided method
fn as_default_item(&self) -> Option<&dyn DefaultItem> { ... }
}Expand description
Item is an item that appears in the list.
Note: box_clone and as_any are Rust-side requirements (trait objects
cannot structurally clone or downcast), mirroring the upstream Go
interface which is implemented by any struct.
Required Methods§
Sourcefn filter_value(&self) -> String
fn filter_value(&self) -> String
FilterValue is the value we use when filtering against this item when we’re filtering the list.
Provided Methods§
Sourcefn as_default_item(&self) -> Option<&dyn DefaultItem>
fn as_default_item(&self) -> Option<&dyn DefaultItem>
Returns the item as a DefaultItem view, if it implements it.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".