Skip to main content

TuiSessionDriver

Trait TuiSessionDriver 

Source
pub trait TuiSessionDriver {
    type Command: TuiCommand;
    type Event;

Show 30 methods // Required methods fn handle_command(&mut self, command: Self::Command); fn handle_event( &mut self, event: Event, events: &UnboundedSender<Self::Event>, callback: Option<&(dyn Fn(&Self::Event) + Send + Sync + 'static)>, ); fn handle_tick(&mut self); fn needs_animation_tick(&self) -> bool; fn render(&mut self, frame: &mut Frame<'_>); fn take_redraw(&mut self) -> bool; fn is_terminal_visible(&self) -> bool; fn use_steady_cursor(&self) -> bool; fn is_hovering_link(&self) -> bool; fn is_selecting_text(&self) -> bool; fn should_exit(&self) -> bool; fn request_exit(&mut self); fn mark_dirty(&mut self); fn update_terminal_title(&mut self); fn attach_program_status_terminal(&mut self); fn flush_program_status(&mut self); fn shutdown_program_status(&mut self); fn clear_terminal_title(&mut self); fn is_running_activity(&self) -> bool; fn has_status_spinner(&self) -> bool; fn thinking_spinner_active(&self) -> bool; fn has_active_navigation_ui(&self) -> bool; fn apply_coalesced_scroll(&mut self, line_delta: i32, page_delta: i32); fn set_show_logs(&mut self, show: bool); fn set_active_pty_sessions(&mut self, sessions: Option<Arc<AtomicUsize>>); fn set_workspace_root(&mut self, root: Option<PathBuf>); fn set_log_receiver(&mut self, receiver: UnboundedReceiver<LogEntry>); fn set_fullscreen_active(&mut self, active: bool); fn set_fullscreen_interaction( &mut self, config: FullscreenInteractionSettings, ); fn set_preview_callback(&mut self, callback: Option<PreviewCallback>);
}

Required Associated Types§

Required Methods§

Source

fn handle_command(&mut self, command: Self::Command)

Source

fn handle_event( &mut self, event: Event, events: &UnboundedSender<Self::Event>, callback: Option<&(dyn Fn(&Self::Event) + Send + Sync + 'static)>, )

Source

fn handle_tick(&mut self)

Source

fn needs_animation_tick(&self) -> bool

Whether the session needs active-rate ticks (animations or transient expiries pending). The drive loop uses this to extend active-mode ticking independently of recent user input, so truly idle sessions rest instead of polling. Input, commands, and crossterm events always render immediately regardless of this flag. Hidden sessions (see Self::is_terminal_visible) must return false: no frame can be observed, so active-rate ticking only burns CPU.

Source

fn render(&mut self, frame: &mut Frame<'_>)

Source

fn take_redraw(&mut self) -> bool

Source

fn is_terminal_visible(&self) -> bool

Whether the terminal view may currently be observable.

Fail-visible: sessions default to true. The drive loop skips frame draws while this is false but keeps processing input and commands.

Source

fn use_steady_cursor(&self) -> bool

Source

fn is_selecting_text(&self) -> bool

Source

fn should_exit(&self) -> bool

Source

fn request_exit(&mut self)

Source

fn mark_dirty(&mut self)

Source

fn update_terminal_title(&mut self)

Source

fn attach_program_status_terminal(&mut self)

Source

fn flush_program_status(&mut self)

Source

fn shutdown_program_status(&mut self)

Source

fn clear_terminal_title(&mut self)

Source

fn is_running_activity(&self) -> bool

Source

fn has_status_spinner(&self) -> bool

Source

fn thinking_spinner_active(&self) -> bool

Source

fn has_active_navigation_ui(&self) -> bool

Source

fn apply_coalesced_scroll(&mut self, line_delta: i32, page_delta: i32)

Source

fn set_show_logs(&mut self, show: bool)

Source

fn set_active_pty_sessions(&mut self, sessions: Option<Arc<AtomicUsize>>)

Source

fn set_workspace_root(&mut self, root: Option<PathBuf>)

Source

fn set_log_receiver(&mut self, receiver: UnboundedReceiver<LogEntry>)

Source

fn set_fullscreen_active(&mut self, active: bool)

Source

fn set_fullscreen_interaction(&mut self, config: FullscreenInteractionSettings)

Source

fn set_preview_callback(&mut self, callback: Option<PreviewCallback>)

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§