pub trait NonBlockingTransport: Transport {
// Required method
fn send_immediately(
future_state: &mut Self::SendFutureState,
sender: &Self::Sender,
) -> Result<(), Self::Error>;
}
Expand description
A transport layer which can send messages without blocking.
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,
sender: &Self::Sender,
) -> Result<(), Self::Error>
fn send_immediately( future_state: &mut Self::SendFutureState, sender: &Self::Sender, ) -> Result<(), Self::Error>
Completes a SendFutureState
using a sender without blocking.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.