[][src]Trait pubnub_hyper::core::TransportService

pub trait TransportService<Request>: Send {
    type Response;
    type Error;
#[must_use]    fn call<'life0, 'async_trait>(
        &'life0 self,
        req: Request
    ) -> Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

Service respresents a single unit of an async request/response based API.

Associated Types

type Response

Response given by the service.

type Error

Error produced by the service.

Loading content...

Required methods

#[must_use]fn call<'life0, 'async_trait>(
    &'life0 self,
    req: Request
) -> Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + 'async_trait + Send>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Process the request and return the response asynchronously.

Loading content...

Implementors

impl Service<GetState> for MockTransport[src]

type Response = JsonValue

type Error = MockTransportError

impl Service<GetState> for Hyper[src]

type Response = GetState

type Error = Error

impl Service<GlobalHereNow<Full>> for MockTransport[src]

type Response = GlobalInfo<Full>

type Error = MockTransportError

impl Service<GlobalHereNow<Full>> for Hyper[src]

type Response = GlobalHereNow<Full>

type Error = Error

impl Service<GlobalHereNow<OccupancyAndUUIDs>> for MockTransport[src]

type Response = GlobalInfo<OccupancyAndUUIDs>

type Error = MockTransportError

impl Service<GlobalHereNow<OccupancyAndUUIDs>> for Hyper[src]

type Response = GlobalHereNow<OccupancyAndUUIDs>

type Error = Error

impl Service<GlobalHereNow<OccupancyOnly>> for MockTransport[src]

type Response = GlobalInfo<OccupancyOnly>

type Error = MockTransportError

impl Service<GlobalHereNow<OccupancyOnly>> for Hyper[src]

type Response = GlobalHereNow<OccupancyOnly>

type Error = Error

impl Service<HereNow<Full>> for MockTransport[src]

type Response = <Full as RespondWith>::Response

type Error = MockTransportError

impl Service<HereNow<Full>> for Hyper[src]

type Response = HereNow<Full>

type Error = Error

impl Service<HereNow<OccupancyAndUUIDs>> for MockTransport[src]

type Response = <OccupancyAndUUIDs as RespondWith>::Response

type Error = MockTransportError

impl Service<HereNow<OccupancyAndUUIDs>> for Hyper[src]

type Response = HereNow<OccupancyAndUUIDs>

type Error = Error

impl Service<HereNow<OccupancyOnly>> for MockTransport[src]

type Response = <OccupancyOnly as RespondWith>::Response

type Error = MockTransportError

impl Service<HereNow<OccupancyOnly>> for Hyper[src]

type Response = HereNow<OccupancyOnly>

type Error = Error

impl Service<Publish> for MockTransport[src]

type Response = Timetoken

type Error = MockTransportError

impl Service<Publish> for Hyper[src]

type Response = Publish

type Error = Error

impl Service<SetState> for MockTransport[src]

type Response = ()

type Error = MockTransportError

impl Service<SetState> for Hyper[src]

type Response = SetState

type Error = Error

impl Service<Subscribe> for MockTransport[src]

type Response = (Vec<Message>, Timetoken)

type Error = MockTransportError

impl Service<Subscribe> for Hyper[src]

type Response = Subscribe

type Error = Error

impl Service<WhereNow> for MockTransport[src]

type Response = Vec<Name>

type Error = MockTransportError

impl Service<WhereNow> for Hyper[src]

type Response = WhereNow

type Error = Error

Loading content...