trusted_proxies

Trait RequestInformation

Source
pub trait RequestInformation {
    // Required methods
    fn is_host_header_allowed(&self) -> bool;
    fn host_header(&self) -> Option<&str>;
    fn scheme(&self) -> Option<&str>;
    fn authority(&self) -> Option<&str>;
    fn forwarded(&self) -> impl DoubleEndedIterator<Item = &str>;
    fn x_forwarded_for(&self) -> impl DoubleEndedIterator<Item = &str>;
    fn x_forwarded_host(&self) -> impl DoubleEndedIterator<Item = &str>;
    fn x_forwarded_proto(&self) -> impl DoubleEndedIterator<Item = &str>;
    fn x_forwarded_by(&self) -> impl DoubleEndedIterator<Item = &str>;

    // Provided methods
    fn default_host(&self) -> Option<&str> { ... }
    fn default_scheme(&self) -> Option<&str> { ... }
}

Required Methods§

Source

fn is_host_header_allowed(&self) -> bool

Source

fn host_header(&self) -> Option<&str>

Source

fn scheme(&self) -> Option<&str>

Source

fn authority(&self) -> Option<&str>

Source

fn forwarded(&self) -> impl DoubleEndedIterator<Item = &str>

Source

fn x_forwarded_for(&self) -> impl DoubleEndedIterator<Item = &str>

Source

fn x_forwarded_host(&self) -> impl DoubleEndedIterator<Item = &str>

Source

fn x_forwarded_proto(&self) -> impl DoubleEndedIterator<Item = &str>

Source

fn x_forwarded_by(&self) -> impl DoubleEndedIterator<Item = &str>

Provided Methods§

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 RequestInformation for Parts

Source§

impl<T> RequestInformation for Request<T>

Implementors§