[][src]Trait pubnub_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>> + Send + 'async_trait>>
    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>> + Send + 'async_trait>> 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 = GetState

type Error = MockTransportError

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

type Response = GlobalHereNow<Full>

type Error = MockTransportError

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

type Response = GlobalHereNow<OccupancyAndUUIDs>

type Error = MockTransportError

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

type Response = GlobalHereNow<OccupancyOnly>

type Error = MockTransportError

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

type Response = HereNow<Full>

type Error = MockTransportError

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

type Response = HereNow<OccupancyAndUUIDs>

type Error = MockTransportError

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

type Response = HereNow<OccupancyOnly>

type Error = MockTransportError

impl Service<Publish> for MockTransport[src]

type Response = Publish

type Error = MockTransportError

impl Service<SetState> for MockTransport[src]

type Response = SetState

type Error = MockTransportError

impl Service<Subscribe> for MockTransport[src]

type Response = Subscribe

type Error = MockTransportError

impl Service<WhereNow> for MockTransport[src]

type Response = WhereNow

type Error = MockTransportError

Loading content...