pub trait TransportStream: Send {
// Required method
fn recv<'a>(
&'a mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<TransportEvent>, TransportError>> + Send + 'a>>;
}Expand description
The read half of a transport: yields one TransportEvent at a time, or None when
the other side closed the connection.
Required Methods§
fn recv<'a>( &'a mut self, ) -> Pin<Box<dyn Future<Output = Result<Option<TransportEvent>, TransportError>> + Send + 'a>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".