pub trait NonBlockingTransport: Transport {
// Required method
fn send_immediately(
future_state: &mut Self::SendFutureState,
shared: &Self::Shared,
) -> Result<(), Option<Self::Error>>;
}Expand description
A transport backend which can send messages without blocking.
Because failed sends return immediately without waiting for an epitaph to be
read, send_immediately may observe transport backend closure prematurely.
Non-blocking send operations cannot apply backpressure, which can cause
memory exhaustion across the system. NonBlockingTransport is intended for
use only while porting existing code.
Required Methods§
Sourcefn send_immediately(
future_state: &mut Self::SendFutureState,
shared: &Self::Shared,
) -> Result<(), Option<Self::Error>>
fn send_immediately( future_state: &mut Self::SendFutureState, shared: &Self::Shared, ) -> Result<(), Option<Self::Error>>
Completes a SendFutureState with the shared part of the transport
backend without blocking.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".