rat_salsa

Trait AppWidget

Source
pub trait AppWidget<Global, Event, Error>
where Event: 'static + Send, Error: 'static + Send,
{ type State: AppState<Global, Event, Error> + ?Sized; // Required method fn render( &self, area: Rect, buf: &mut Buffer, state: &mut Self::State, ctx: &mut RenderContext<'_, Global>, ) -> Result<(), Error>; }
Expand description

AppWidget mimics StatefulWidget and adds a RenderContext

Required Associated Types§

Source

type State: AppState<Global, Event, Error> + ?Sized

Type of the State.

Required Methods§

Source

fn render( &self, area: Rect, buf: &mut Buffer, state: &mut Self::State, ctx: &mut RenderContext<'_, Global>, ) -> Result<(), Error>

Renders an application widget.

Implementors§