Trait RpcTransport
pub trait RpcTransport: Send + 'static {
// Required methods
fn writer(&self) -> Sender<String>;
fn next_frame<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn peer_label(&self) -> String;
fn kind(&self) -> TransportKind;
// Provided method
fn credential(&self) -> Credential { ... }
}Required Methods§
fn writer(&self) -> Sender<String>
fn next_frame<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn peer_label(&self) -> String
Sourcefn kind(&self) -> TransportKind
fn kind(&self) -> TransportKind
Which transport class this connection arrived on.
Provided Methods§
Sourcefn credential(&self) -> Credential
fn credential(&self) -> Credential
The transport-intrinsic credential: the kernel-reported peer uid on
Unix sockets. Credential::None when the transport supplies
nothing (remote WSS, Windows named pipes) — those connections
authenticate by presenting an explicit credential in initialize.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".