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§
fn into_req(&self, id: impl ToString) -> Requestwhere
Self: Sized,
fn try_from_req(
req: Request,
) -> Result<Self, Box<dyn Error + Send + Sync + 'static>>where
Self: Sized,
Provided Methods§
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.