pub trait RequestTrait {
// Required methods
fn content_type(&self) -> Mime;
fn header<K>(&self, key: K) -> Option<&str>
where K: AsHeaderName;
fn user_agent(&self) -> &str;
fn path<'life0, 'async_trait, T>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<T, PathRejection>> + Send + 'async_trait>>
where T: 'async_trait + DeserializeOwned + Send + 'static,
Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
fn content_type(&self) -> Mime
fn header<K>(&self, key: K) -> Option<&str>where
K: AsHeaderName,
fn user_agent(&self) -> &str
fn path<'life0, 'async_trait, T>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<T, PathRejection>> + Send + 'async_trait>>where
T: 'async_trait + DeserializeOwned + Send + 'static,
Self: 'async_trait,
'life0: 'async_trait,
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.