Skip to main content

TuiCommand

Trait TuiCommand 

Source
pub trait TuiCommand {
    // Required methods
    fn is_suspend_event_loop(&self) -> bool;
    fn is_resume_event_loop(&self) -> bool;
    fn is_clear_input_queue(&self) -> bool;
    fn is_force_redraw(&self) -> bool;
    fn is_stop_event_stream(&self) -> bool;
    fn is_start_event_stream(&self) -> bool;

    // Provided method
    fn absorb_transcript_append(&mut self, next: Self) -> Result<(), Self>
       where Self: Sized { ... }
}

Required Methods§

Provided Methods§

Source

fn absorb_transcript_append(&mut self, next: Self) -> Result<(), Self>
where Self: Sized,

Merge next into self when both are adjacent transcript appends.

The drain loop uses this to paint a burst of streamed lines in one frame instead of one frame per MAX_COMMANDS_PER_TURN slice. Returns Ok(()) when next was absorbed, or Err(next) unchanged otherwise. The default keeps every command distinct.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl TuiCommand for vtcode_ui::tui::core_tui::app::types::InlineCommand

Source§

impl TuiCommand for vtcode_ui::tui::core_tui::types::InlineCommand