pub trait ShellSession:
Send
+ Sync
+ Debug {
// Required methods
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
command: &'life1 str,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<ShellOutput, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn cancel(&self);
fn reset<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Persistent shell session contract (“Shell session” extension).
Required behavior: persistent command environment across calls, cancellation, bounded output, explicit reset (design table row 3).
Required Methods§
Sourcefn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
command: &'life1 str,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<ShellOutput, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
command: &'life1 str,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<ShellOutput, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute command in the persistent environment.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".