Trait chargrid_runtime::Component
source · [−]pub trait Component {
type Output;
type State: ?Sized;
fn render(&self, state: &Self::State, ctx: Ctx<'_>, fb: &mut FrameBuffer);
fn update(
&mut self,
state: &mut Self::State,
ctx: Ctx<'_>,
event: Event
) -> Self::Output;
fn size(&self, state: &Self::State, ctx: Ctx<'_>) -> Size;
}