Skip to main content

MenuItemIdentifierDynamic

Struct MenuItemIdentifierDynamic 

Source
pub struct MenuItemIdentifierDynamic<U>{ /* private fields */ }

Trait Implementations§

Source§

impl<U> Component for MenuItemIdentifierDynamic<U>

Source§

type Output = ()

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§

type State = ()

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§

fn render( &self, state: &<MenuItemIdentifierDynamic<U> as Component>::State, ctx: Ctx<'_>, fb: &mut FrameBuffer, )

Render the component to a frame buffer
Source§

fn update( &mut self, _state: &mut <MenuItemIdentifierDynamic<U> as Component>::State, _ctx: Ctx<'_>, event: Event, ) -> <MenuItemIdentifierDynamic<U> as Component>::Output

Update the internal and extnal state of this component in response to an event, and yield a value.
Source§

fn size( &self, state: &<MenuItemIdentifierDynamic<U> as Component>::State, ctx: Ctx<'_>, ) -> UCoord

Return the current size (in cells) of this component. This allows decorators to account for the size of the components they decorate (e.g. when drawing a border around a component, its size must be known).
Source§

impl<U> MenuItemIdentifier for MenuItemIdentifierDynamic<U>

Source§

fn init_selection(&mut self, selection: bool)

Source§

fn set_selection(&mut self, selection: bool)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.