[][src]Struct tari_service_framework::reply_channel::SenderService

pub struct SenderService<TReq, TRes> { /* fields omitted */ }

Requester is sends requests on a given Tx sender and returns a AwaitResponseFuture which will resolve to the generic TRes.

This should be used to make requests which require a response.

This implements tower_service::Service, therefore the poll_ready and call methods should be used to make a request.

Implementations

impl<TReq, TRes> SenderService<TReq, TRes>[src]

pub fn new(tx: UnboundedSender<(TReq, Sender<TRes>)>) -> Self[src]

Create a new Requester

Trait Implementations

impl<TReq, TRes> Clone for SenderService<TReq, TRes>[src]

impl<TReq, TRes> Service<TReq> for SenderService<TReq, TRes>[src]

type Error = TransportChannelError

Errors produced by the service.

type Future = TransportResponseFuture<TRes>

The future response value.

type Response = TRes

Responses given by the service.

Auto Trait Implementations

impl<TReq, TRes> !RefUnwindSafe for SenderService<TReq, TRes>

impl<TReq, TRes> Send for SenderService<TReq, TRes> where
    TReq: Send,
    TRes: Send

impl<TReq, TRes> Sync for SenderService<TReq, TRes> where
    TReq: Send,
    TRes: Send

impl<TReq, TRes> Unpin for SenderService<TReq, TRes>

impl<TReq, TRes> !UnwindSafe for SenderService<TReq, TRes>

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.