Trait embedded_menu::items::MenuListItem
source · 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.
Object Safety§
This trait is not object safe.