Trait embedded_menu::MenuItem
source · pub trait MenuItem<R>: Marker + View {
// Required methods
fn value_of(&self) -> R;
fn interact(&mut self) -> R;
fn set_style<C, S, IT, P>(&mut self, style: &MenuStyle<C, S, IT, P, R>)
where C: PixelColor,
S: IndicatorStyle,
IT: InputAdapterSource<R>,
P: SelectionIndicatorController;
fn title(&self) -> &str;
fn details(&self) -> &str;
fn value(&self) -> &str;
fn draw_styled<C, S, IT, P, DIS>(
&self,
style: &MenuStyle<C, S, IT, P, R>,
display: &mut DIS
) -> Result<(), DIS::Error>
where C: PixelColor + From<Rgb888>,
S: IndicatorStyle,
IT: InputAdapterSource<R>,
P: SelectionIndicatorController,
DIS: DrawTarget<Color = C>;
// Provided method
fn selectable(&self) -> bool { ... }
}
Required Methods§
fn interact(&mut self) -> R
fn set_style<C, S, IT, P>(&mut self, style: &MenuStyle<C, S, IT, P, R>)
fn title(&self) -> &str
fn details(&self) -> &str
fn value(&self) -> &str
fn draw_styled<C, S, IT, P, DIS>(
&self,
style: &MenuStyle<C, S, IT, P, R>,
display: &mut DIS
) -> Result<(), DIS::Error>where
C: PixelColor + From<Rgb888>,
S: IndicatorStyle,
IT: InputAdapterSource<R>,
P: SelectionIndicatorController,
DIS: DrawTarget<Color = C>,
Provided Methods§
fn selectable(&self) -> bool
Object Safety§
This trait is not object safe.