seraphic

Trait RequestWrapper

Source
pub trait RequestWrapper: Debug + PartialEq {
    // Required methods
    fn into_req(&self, id: impl ToString) -> Request
       where Self: Sized;
    fn try_from_req(
        req: Request,
    ) -> Result<Self, Box<dyn Error + Send + Sync + 'static>>
       where Self: Sized;

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

Required Methods§

Source

fn into_req(&self, id: impl ToString) -> Request
where Self: Sized,

Source

fn try_from_req( req: Request, ) -> Result<Self, Box<dyn Error + Send + Sync + 'static>>
where Self: Sized,

Provided Methods§

Source

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

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.

Implementors§