Trait NonBlockingTransport

Source
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 layer which can send messages without blocking.

Because failed sends return immediately without waiting for an epitaph to be read, send_immediately may observe transport 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§

Source

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 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.

Implementations on Foreign Types§

Source§

impl NonBlockingTransport for Channel

Source§

fn send_immediately( future_state: &mut Self::SendFutureState, shared: &Self::Shared, ) -> Result<(), Option<Self::Error>>

Implementors§