pub trait ClientTransport: Send {
Show 13 methods
// Required methods
fn session_id(&self) -> &SessionId;
fn meta(&self) -> &SessionMeta;
fn send<'life0, 'async_trait>(
&'life0 self,
cmd: SessionCommand,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_from_self<'life0, 'async_trait>(
&'life0 self,
cmd: SessionCommand,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn next_event<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<Envelope>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn view(&self) -> Arc<RuntimeView> ⓘ;
fn client_id(&self) -> ClientId;
fn mode(&self) -> AttachMode;
fn input_owner(&self) -> Option<ClientId>;
fn reconnect<'life0, 'async_trait>(
&'life0 mut self,
mode: AttachMode,
) -> Pin<Box<dyn Future<Output = Result<AttachSnapshot, TransportError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn reconnect_once<'life0, 'async_trait>(
&'life0 mut self,
mode: AttachMode,
) -> Pin<Box<dyn Future<Output = Result<AttachSnapshot, TransportError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn is_reload_pending(&self) -> bool { ... }
fn daemon_pid(&self) -> u32 { ... }
}Required Methods§
fn session_id(&self) -> &SessionId
fn meta(&self) -> &SessionMeta
Sourcefn send<'life0, 'async_trait>(
&'life0 self,
cmd: SessionCommand,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
cmd: SessionCommand,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Host-originated send (from: None; bypasses input ownership).
Sourcefn send_from_self<'life0, 'async_trait>(
&'life0 self,
cmd: SessionCommand,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_from_self<'life0, 'async_trait>(
&'life0 self,
cmd: SessionCommand,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send stamped with this client’s id (the TUI uses this; ownership is enforced by the actor, B1).
Sourcefn next_event<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<Envelope>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next_event<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<Envelope>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Next envelope, or None when the session ended / socket closed.
Sourcefn view(&self) -> Arc<RuntimeView> ⓘ
fn view(&self) -> Arc<RuntimeView> ⓘ
Sync, cheap, never stale by more than one SettingChanged: what the
TUI’s getters read on day 2.
Sourcefn mode(&self) -> AttachMode
fn mode(&self) -> AttachMode
The mode this transport attached with.
Sourcefn input_owner(&self) -> Option<ClientId>
fn input_owner(&self) -> Option<ClientId>
Current input owner — updated from Attached / InputOwnerChanged.
Sourcefn reconnect<'life0, 'async_trait>(
&'life0 mut self,
mode: AttachMode,
) -> Pin<Box<dyn Future<Output = Result<AttachSnapshot, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reconnect<'life0, 'async_trait>(
&'life0 mut self,
mode: AttachMode,
) -> Pin<Box<dyn Future<Output = Result<AttachSnapshot, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Socket only (Local returns Err(Unsupported)): after Reloading/EOF,
reconnect with backoff and re-attach with mode (C3/A4).
Provided Methods§
Sourcefn reconnect_once<'life0, 'async_trait>(
&'life0 mut self,
mode: AttachMode,
) -> Pin<Box<dyn Future<Output = Result<AttachSnapshot, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reconnect_once<'life0, 'async_trait>(
&'life0 mut self,
mode: AttachMode,
) -> Pin<Box<dyn Future<Output = Result<AttachSnapshot, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
F9: single reconnect attempt (no retry loop). Socket only.
Sourcefn is_reload_pending(&self) -> bool
fn is_reload_pending(&self) -> bool
true if the daemon announced a reload before EOF (graceful). Always
false on LocalTransport.
Sourcefn daemon_pid(&self) -> u32
fn daemon_pid(&self) -> u32
The daemon pid from Welcome. Returns 0 on LocalTransport.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".