Trait request_response::request::Response
source · pub trait Response<R: Request>:
Send
+ Sync
+ Serializable
+ Clone
+ Debug
+ PartialEq
+ Eq {
// Required method
fn validate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 R,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
A trait that a response needs to implement
Required Methods§
sourcefn validate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 R,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 R,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Validate the response, making sure it is valid for the given request
§Errors
If the response is not valid for the given request
Object Safety§
This trait is not object safe.