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