Trait dialectic::backend::Receive [−][src]
If a transport is Receive<T>
, we can use it to recv
a message of
type T
.
If you’re writing a function and need a lot of different Receive<T>
bounds, the
Receiver
attribute macro can help you specify them more succinctly.
Examples
For an example of implementing Receive
, check out the source for the implementation of
Receive
for the dialectic_tokio_mpsc::Receiver
type in the dialectic_tokio_mpsc
crate.
Required methods
fn recv<'async_lifetime>(
&'async_lifetime mut self
) -> Pin<Box<dyn Future<Output = Result<T, Self::Error>> + Send + 'async_lifetime>>
[src]
&'async_lifetime mut self
) -> Pin<Box<dyn Future<Output = Result<T, Self::Error>> + Send + 'async_lifetime>>
Receive a message. This may require type annotations for disambiguation.