ProtobufResponseExt

Trait ProtobufResponseExt 

Source
pub trait ProtobufResponseExt {
    // Required method
    fn protobuf<'async_trait, T>(
        self,
    ) -> Pin<Box<dyn Future<Output = Result<T, DecodeError>> + Send + 'async_trait>>
       where T: 'async_trait + Message + Default,
             Self: 'async_trait;
}
Expand description

Extension trait for the Response

Required Methods§

Source

fn protobuf<'async_trait, T>( self, ) -> Pin<Box<dyn Future<Output = Result<T, DecodeError>> + Send + 'async_trait>>
where T: 'async_trait + Message + Default, Self: 'async_trait,

Get the response body decoded from Protobuf

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ProtobufResponseExt for Response

Source§

fn protobuf<'async_trait, T>( self, ) -> Pin<Box<dyn Future<Output = Result<T, DecodeError>> + Send + 'async_trait>>
where T: 'async_trait + Message + Default, Self: 'async_trait,

Implementors§