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§
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 Methods§
Sourcefn absorb_transcript_append(&mut self, next: Self) -> Result<(), Self>where
Self: Sized,
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".