pub struct Align<C: Component> {
pub component: C,
pub alignment: Alignment,
}Fields§
§component: C§alignment: AlignmentImplementations§
Trait Implementations§
Source§impl<C: Component> Component for Align<C>
impl<C: Component> Component for Align<C>
Source§type Output = <C as Component>::Output
type Output = <C as Component>::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 = <C as Component>::State
type State = <C as Component>::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: &Self::State, ctx: Ctx<'_>, fb: &mut FrameBuffer)
fn render(&self, state: &Self::State, ctx: Ctx<'_>, fb: &mut FrameBuffer)
Render the component to a frame buffer
Auto Trait Implementations§
impl<C> Freeze for Align<C>where
C: Freeze,
impl<C> RefUnwindSafe for Align<C>where
C: RefUnwindSafe,
impl<C> Send for Align<C>where
C: Send,
impl<C> Sync for Align<C>where
C: Sync,
impl<C> Unpin for Align<C>where
C: Unpin,
impl<C> UnwindSafe for Align<C>where
C: UnwindSafe,
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