[][src]Struct tari_service_framework::reply_channel::Receiver

pub struct Receiver<TReq, TResp> { /* fields omitted */ }

Receiver side of the reply channel. This is functionally equivalent to rx.map(|(req, reply_tx)| RequestContext::new(req, reply_tx)) but is ergonomically better to use with the futures::select macro (implements FusedStream) and has a short type signature.

Implementations

impl<TReq, TResp> Receiver<TReq, TResp>[src]

pub fn new(rx: UnboundedReceiver<(TReq, Sender<TResp>)>) -> Self[src]

pub fn close(&mut self)[src]

Trait Implementations

impl<TReq, TResp> FusedStream for Receiver<TReq, TResp>[src]

impl<TReq, TResp> Stream for Receiver<TReq, TResp>[src]

type Item = RequestContext<TReq, TResp>

Values yielded by the stream.

Auto Trait Implementations

impl<TReq, TResp> !RefUnwindSafe for Receiver<TReq, TResp>

impl<TReq, TResp> Send for Receiver<TReq, TResp> where
    TReq: Send,
    TResp: Send

impl<TReq, TResp> Sync for Receiver<TReq, TResp> where
    TReq: Send,
    TResp: Send

impl<TReq, TResp> Unpin for Receiver<TReq, TResp>

impl<TReq, TResp> !UnwindSafe for Receiver<TReq, TResp>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StreamExt for T where
    T: Stream + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.