Trait dialectic::backend::Receiver [−][src]
A backend transport used for receiving (i.e. the Rx
parameter of Chan
) must
implement Receiver
, which specifies what type of errors it might return, as well as giving a
method to send Choice
s across the channel. This is a super-trait of Receive
, which is
what’s actually needed to receive particular values over a Chan
.
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.
Associated Types
Loading content...Required methods
fn recv_choice<'async_lifetime, const LENGTH: usize>(
&'async_lifetime mut self
) -> Pin<Box<dyn Future<Output = Result<Choice<LENGTH>, Self::Error>> + Send + 'async_lifetime>>
[src]
&'async_lifetime mut self
) -> Pin<Box<dyn Future<Output = Result<Choice<LENGTH>, Self::Error>> + Send + 'async_lifetime>>
Receive any Choice<N>
. It is impossible to construct a Choice<0>
, so if N = 0
, a
Receiver::Error
must be returned.