pub trait SessionDriver: Send + Sync {
// Required methods
fn events(&self) -> Option<UnboundedReceiver<DriverEvent>>;
fn send<'life0, 'async_trait>(
&'life0 self,
command: DriverCommand,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A backend the TUI can drive: it yields DriverEvents and accepts
DriverCommands. Both the in-process host and the remote client
implement it, so the transcript render layer above is transport-agnostic.
Required Methods§
Sourcefn events(&self) -> Option<UnboundedReceiver<DriverEvent>>
fn events(&self) -> Option<UnboundedReceiver<DriverEvent>>
Take the driver’s event receiver. Returns Some exactly once; later
calls return None.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".