pub trait MenuListItem<R>: Marker + View {
// Required methods
fn value_of(&self) -> R;
fn interact(&mut self) -> R;
fn set_style(&mut self, text_style: &MonoTextStyle<'_, BinaryColor>);
fn draw_styled<D>(
&self,
text_style: &MonoTextStyle<'static, BinaryColor>,
display: &mut D,
) -> Result<(), D::Error>
where D: DrawTarget<Color = BinaryColor>;
// Provided method
fn selectable(&self) -> bool { ... }
}
Required Methods§
fn interact(&mut self) -> R
fn set_style(&mut self, text_style: &MonoTextStyle<'_, BinaryColor>)
fn draw_styled<D>(
&self,
text_style: &MonoTextStyle<'static, BinaryColor>,
display: &mut D,
) -> Result<(), D::Error>where
D: DrawTarget<Color = BinaryColor>,
Provided Methods§
Sourcefn selectable(&self) -> bool
fn selectable(&self) -> bool
Returns whether the list item is selectable.
If this returns false, the list item will not be interactable and user navigation will skip over it.
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.