[][src]Trait broot::app::AppState

pub trait AppState {
    fn apply(
        &mut self,
        cmd: &mut Command,
        screen: &mut Screen,
        con: &AppContext
    ) -> Result<AppStateCmdResult, ProgramError>;
fn can_execute(&self, verb_index: usize, con: &AppContext) -> bool;
fn refresh(&mut self, screen: &Screen, con: &AppContext) -> Command;
fn do_pending_task(&mut self, screen: &mut Screen, dam: &mut Dam);
fn has_pending_task(&self) -> bool;
fn display(
        &mut self,
        w: &mut dyn Write,
        screen: &Screen,
        con: &AppContext
    ) -> Result<(), ProgramError>;
fn write_flags(
        &self,
        w: &mut dyn Write,
        screen: &mut Screen,
        con: &AppContext
    ) -> Result<(), ProgramError>;
fn write_status(
        &self,
        w: &mut dyn Write,
        cmd: &Command,
        screen: &Screen,
        con: &AppContext
    ) -> Result<(), ProgramError>; }

a whole application state, stackable to allow reverting to a previous one

Required methods

fn apply(
    &mut self,
    cmd: &mut Command,
    screen: &mut Screen,
    con: &AppContext
) -> Result<AppStateCmdResult, ProgramError>

fn can_execute(&self, verb_index: usize, con: &AppContext) -> bool

fn refresh(&mut self, screen: &Screen, con: &AppContext) -> Command

fn do_pending_task(&mut self, screen: &mut Screen, dam: &mut Dam)

fn has_pending_task(&self) -> bool

fn display(
    &mut self,
    w: &mut dyn Write,
    screen: &Screen,
    con: &AppContext
) -> Result<(), ProgramError>

fn write_flags(
    &self,
    w: &mut dyn Write,
    screen: &mut Screen,
    con: &AppContext
) -> Result<(), ProgramError>

fn write_status(
    &self,
    w: &mut dyn Write,
    cmd: &Command,
    screen: &Screen,
    con: &AppContext
) -> Result<(), ProgramError>

Loading content...

Implementors

impl AppState for BrowserState[src]

fn do_pending_task(&mut self, screen: &mut Screen, dam: &mut Dam)[src]

do some work, totally or partially, if there's some to do. Stop as soon as the dam asks for interruption

fn write_flags(
    &self,
    w: &mut dyn Write,
    screen: &mut Screen,
    _con: &AppContext
) -> Result<(), ProgramError>
[src]

draw the flags at the bottom right of the screen

impl AppState for HelpState[src]

fn write_flags(
    &self,
    w: &mut dyn Write,
    screen: &mut Screen,
    _con: &AppContext
) -> Result<(), ProgramError>
[src]

there's no meaningful flags here

Loading content...