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§
Sourcefn can_start_session(&self) -> bool
fn can_start_session(&self) -> bool
Check whether a new PTY session can be started.
Sourcefn active_session_count(&self) -> usize
fn active_session_count(&self) -> usize
Get the number of currently active PTY sessions.
Sourcefn 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 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.
Sourcefn exec_session_manager(&self) -> ExecSessionManager
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".