Skip to main content

PtySessionControl

Trait PtySessionControl 

Source
pub trait PtySessionControl: Send + Sync {
    // Required methods
    fn can_start_session(&self) -> bool;
    fn active_session_count(&self) -> usize;
    fn terminate_all_sessions<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn exec_session_manager(&self) -> ExecSessionManager;
}
Expand description

PTY (pseudo-terminal) session lifecycle management.

Manages creation, tracking, and teardown of PTY sessions used for interactive shell command execution.

Required Methods§

Source

fn can_start_session(&self) -> bool

Check whether a new PTY session can be started.

Source

fn active_session_count(&self) -> usize

Get the number of currently active PTY sessions.

Source

fn terminate_all_sessions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Terminate all active PTY sessions.

Source

fn exec_session_manager(&self) -> ExecSessionManager

Get the exec session manager for subprocess tracking.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§