pub trait ResponseWrapper: Debug + PartialEq {
// Required methods
fn into_res(&self, id: impl ToString) -> Response
where Self: Sized;
fn try_from_res(
res: Response,
) -> 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§
fn into_res(&self, id: impl ToString) -> Responsewhere
Self: Sized,
fn try_from_res(
res: Response,
) -> Result<Result<Self, Error>, Box<dyn Error + Send + Sync + 'static>>where
Self: Sized,
Provided Methods§
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", so this trait is not object safe.