Skip to main content

ShellRuntime

Trait ShellRuntime 

Source
pub trait ShellRuntime: Send + Sync {
    // Required methods
    fn configure_session<'a>(
        &'a self,
        bash_state: &'a mut BashState,
        transition: ShellSessionTransition,
    ) -> ShellRuntimeConfigureFuture<'a>;
    fn run_action<'a>(
        &'a self,
        bash_state: &'a Arc<Mutex<Option<BashState>>>,
        command: BashCommand,
    ) -> ShellRuntimeFuture<'a>;
    fn interrupt<'a>(
        &'a self,
        bash_state: &'a Arc<Mutex<Option<BashState>>>,
    ) -> ShellRuntimeUnitFuture<'a>;
    fn terminate_session<'a>(
        &'a self,
        thread_id: &'a str,
    ) -> ShellRuntimeUnitFuture<'a>;
}
Expand description

Narrow process-agnostic boundary for BashCommand execution.

Required Methods§

Source

fn configure_session<'a>( &'a self, bash_state: &'a mut BashState, transition: ShellSessionTransition, ) -> ShellRuntimeConfigureFuture<'a>

Source

fn run_action<'a>( &'a self, bash_state: &'a Arc<Mutex<Option<BashState>>>, command: BashCommand, ) -> ShellRuntimeFuture<'a>

Source

fn interrupt<'a>( &'a self, bash_state: &'a Arc<Mutex<Option<BashState>>>, ) -> ShellRuntimeUnitFuture<'a>

Source

fn terminate_session<'a>( &'a self, thread_id: &'a str, ) -> ShellRuntimeUnitFuture<'a>

Release the runtime-owned resources for one logical session.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§