Trait rat_salsa::AppWidget

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

A trait for application level widgets.

This trait is an anlog to ratatui’s StatefulWidget, and does only the rendering part. It’s extended with all the extras needed in an application.

Required Associated Types§

source

type State: AppState<Global, Message, Error> + Debug

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§