Trait toy_rpc::codec::ClientCodec[][src]

pub trait ClientCodec: GracefulShutdown + Send + Sync {
#[must_use]    fn read_response_header<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Option<Result<ResponseHeader, Error>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn read_response_body<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Option<Result<Box<dyn Deserializer<'static> + Send + 'static>, Error>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn write_request<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        header: RequestHeader,
        body: &'life1 (dyn Serialize + Send + Sync)
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }

Required methods

#[must_use]fn read_response_header<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Option<Result<ResponseHeader, Error>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn read_response_body<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Option<Result<Box<dyn Deserializer<'static> + Send + 'static>, Error>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]fn write_request<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    header: RequestHeader,
    body: &'life1 (dyn Serialize + Send + Sync)
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Loading content...

Implementors

impl<T> ClientCodec for T where
    T: CodecRead + CodecWrite + GracefulShutdown + Send + Sync
[src]

Loading content...