Skip to main content

ResponseWrapper

Trait ResponseWrapper 

Source
pub trait ResponseWrapper: Debug + PartialEq {
    // Required methods
    fn into_res(&self, id: impl ToString) -> IdentifiedResponse
       where Self: Sized;
    fn try_from_res(
        res: IdentifiedResponse,
    ) -> Result<Result<Self, Error>, Box<dyn Error + Send + Sync + 'static>>
       where Self: Sized;

    // Provided method
    fn into_message<Rq>(self, id: impl ToString) -> Message<Rq, Self>
       where Rq: RequestWrapper,
             Self: Sized { ... }
}

Required Methods§

Source

fn into_res(&self, id: impl ToString) -> IdentifiedResponse
where Self: Sized,

Source

fn try_from_res( res: IdentifiedResponse, ) -> Result<Result<Self, Error>, Box<dyn Error + Send + Sync + 'static>>
where Self: Sized,

Provided Methods§

Source

fn into_message<Rq>(self, id: impl ToString) -> Message<Rq, Self>
where Rq: RequestWrapper, Self: Sized,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§