[][src]Struct bmrng::RequestSender

pub struct RequestSender<Req, Res> { /* fields omitted */ }

Send values to the associated RequestReceiver.

Implementations

impl<Req, Res> RequestSender<Req, Res>[src]

pub async fn send(
    &self,
    request: Req
) -> Result<ResponseReceiver<Res>, SendError<Req>>
[src]

Send a request over the MPSC channel, open the response channel

Return the ResponseReceiver which can be used to wait for a response

This call blocks if the request channel is full. It does not wait for a response

pub async fn send_receive(&self, request: Req) -> Result<Res, RequestError<Req>>[src]

Send a request over the MPSC channel, wait for the response and return it

This call blocks if the request channel is full, and while waiting for the response

pub fn is_closed(&self) -> bool[src]

Checks if the channel has been closed.

Trait Implementations

impl<Req, Res> Clone for RequestSender<Req, Res>[src]

impl<Req: Debug, Res: Debug> Debug for RequestSender<Req, Res>[src]

Auto Trait Implementations

impl<Req, Res> !RefUnwindSafe for RequestSender<Req, Res>[src]

impl<Req, Res> Send for RequestSender<Req, Res> where
    Req: Send,
    Res: Send
[src]

impl<Req, Res> Sync for RequestSender<Req, Res> where
    Req: Send,
    Res: Send
[src]

impl<Req, Res> Unpin for RequestSender<Req, Res>[src]

impl<Req, Res> !UnwindSafe for RequestSender<Req, Res>[src]

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.