Trait RequestTrait

Source
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§

Source

fn content_type(&self) -> Mime

Source

fn header<K>(&self, key: K) -> Option<&str>
where K: AsHeaderName,

Source

fn user_agent(&self) -> &str

Source

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.

Implementations on Foreign Types§

Source§

impl RequestTrait for Request

Source§

fn content_type(&self) -> Mime

Source§

fn header<K>(&self, key: K) -> Option<&str>
where K: AsHeaderName,

Source§

fn user_agent(&self) -> &str

Source§

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,

Implementors§