Crate bmrng

Crate bmrng 

Source
Expand description

An async MPSC request-response channel for Tokio, where you can send a response to the sender.

See bmrng::channel() for a channel with backpressure and bmrng::unbounded::channel() for a channel without backpressure.

Re-exports§

pub use unbounded::channel as unbounded_channel;
pub use unbounded::channel_with_timeout as unbounded_channel_with_timeout;

Modules§

error
The errors produced by this crate
unbounded
The unbounded channel alternative

Structs§

RequestReceiver
Receive requests values from the associated RequestSender
RequestReceiverStream
A wrapper around RequestReceiver that implements Stream.
RequestSender
Send values to the associated RequestReceiver.
Responder
Send values back to the RequestSender or RequestReceiver
ResponseReceiver
Receive responses from a Responder

Functions§

channel
Creates a bounded mpsc request-response channel for communicating between asynchronous tasks with backpressure
channel_with_timeout
Creates a bounded mpsc request-response channel for communicating between asynchronous tasks with backpressure and a request timeout

Type Aliases§

Payload
The internal data sent in the MPSC request channel, a tuple that contains the request and the oneshot response channel responder