pub struct Menu<T: Clone, S = ()> { /* private fields */ }Implementations§
Trait Implementations§
Source§impl<T: Clone, S> Component for Menu<T, S>
impl<T: Clone, S> Component for Menu<T, S>
Source§type State = S
type State = S
The type of the external state of this component. This allows multiple different components
to share the same piece of state. For components whose entire state is contained within the
component itself, set this to
().Source§type Output = Option<T>
type Output = Option<T>
The type yielded by the component in response to an event. Typical components only yield
meaningful results when certain conditions have been met (e.g. an item is chosen from a
menu), thus it’s common for this type to be
Option<_>.Source§fn render(&self, state: &S, ctx: Ctx<'_>, fb: &mut FrameBuffer)
fn render(&self, state: &S, ctx: Ctx<'_>, fb: &mut FrameBuffer)
Render the component to a frame buffer
Auto Trait Implementations§
impl<T, S> Freeze for Menu<T, S>
impl<T, S = ()> !RefUnwindSafe for Menu<T, S>
impl<T, S = ()> !Send for Menu<T, S>
impl<T, S = ()> !Sync for Menu<T, S>
impl<T, S> Unpin for Menu<T, S>where
T: Unpin,
impl<T, S = ()> !UnwindSafe for Menu<T, S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more