Skip to main content

DebugAdapter

Trait DebugAdapter 

Source
pub trait DebugAdapter<S, A>: 'static {
    // Required methods
    fn render(
        &mut self,
        frame: &mut Frame<'_>,
        state: &S,
        render_ctx: RenderContext,
        render_fn: &mut dyn FnMut(&mut Frame<'_>, Rect, &S, RenderContext),
    );
    fn handle_event(
        &mut self,
        event: &EventKind,
        state: &S,
        action_tx: &UnboundedSender<A>,
    ) -> Option<bool>;
    fn log_action(&mut self, action: &A);
    fn is_enabled(&self) -> bool;
}

Required Methods§

Source

fn render( &mut self, frame: &mut Frame<'_>, state: &S, render_ctx: RenderContext, render_fn: &mut dyn FnMut(&mut Frame<'_>, Rect, &S, RenderContext), )

Source

fn handle_event( &mut self, event: &EventKind, state: &S, action_tx: &UnboundedSender<A>, ) -> Option<bool>

Source

fn log_action(&mut self, action: &A)

Source

fn is_enabled(&self) -> bool

Implementors§

Source§

impl<S, A> DebugAdapter<S, A> for DebugLayer<A>
where S: DebugState + 'static, A: Action + ActionParams,