pub trait ListItemContent {
// Required method
fn ui(self, ui: &mut Ui, context: &ContentContext<'_>) -> Response;
// Provided method
fn interactive(&self) -> bool { ... }
}Expand description
Trait for types that can be rendered as list item content
Implement this trait to create custom list item content types. The framework provides several built-in implementations:
LabelContent- Simple text with optional iconPropertyContent- Key-value pair displayButtonContent- Clickable button content with styles
Required Methods§
Sourcefn ui(self, ui: &mut Ui, context: &ContentContext<'_>) -> Response
fn ui(self, ui: &mut Ui, context: &ContentContext<'_>) -> Response
Paint the content inside context.rect and return the row response.
Provided Methods§
Sourcefn interactive(&self) -> bool
fn interactive(&self) -> bool
Whether the row reacts to the pointer. Disabled content returns false.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".