pub struct ForwardedHeaderConfig {
pub by: ForwardeeMode,
pub for: ForwardeeMode,
pub host: bool,
pub proto: bool,
}Expand description
Configuration for the Forwarded header.
Fields§
§by: ForwardeeModeThe mode for the by field of the Forwarded header.
for: ForwardeeModeThe mode for the for field of the Forwarded header.
host: boolWhether to include the host field in the Forwarded header.
proto: boolWhether to include the proto field in the Forwarded header.
Implementations§
Source§impl ForwardedHeaderConfig
impl ForwardedHeaderConfig
Sourcepub fn from_request<B>(&self, request: &Request<B>) -> Forwarded
pub fn from_request<B>(&self, request: &Request<B>) -> Forwarded
Build a Forwarded header from a request.
Trait Implementations§
Source§impl Clone for ForwardedHeaderConfig
impl Clone for ForwardedHeaderConfig
Source§fn clone(&self) -> ForwardedHeaderConfig
fn clone(&self) -> ForwardedHeaderConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ForwardedHeaderConfig
impl Debug for ForwardedHeaderConfig
Source§impl Default for ForwardedHeaderConfig
impl Default for ForwardedHeaderConfig
Source§impl Hash for ForwardedHeaderConfig
impl Hash for ForwardedHeaderConfig
Source§impl PartialEq for ForwardedHeaderConfig
impl PartialEq for ForwardedHeaderConfig
impl Eq for ForwardedHeaderConfig
impl StructuralPartialEq for ForwardedHeaderConfig
Auto Trait Implementations§
impl !Freeze for ForwardedHeaderConfig
impl RefUnwindSafe for ForwardedHeaderConfig
impl Send for ForwardedHeaderConfig
impl Sync for ForwardedHeaderConfig
impl Unpin for ForwardedHeaderConfig
impl UnwindSafe for ForwardedHeaderConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<R> FirstAddrExt for R
impl<R> FirstAddrExt for R
Source§fn first_addr(self) -> FirstAddrResolver<Self>where
Self: Sized,
fn first_addr(self) -> FirstAddrResolver<Self>where
Self: Sized,
Convert this resolver into a
FirstAddrResolver. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<S> ServiceBailExt for S
impl<S> ServiceBailExt for S
Source§fn bail<F>(self, preprocessor: F) -> BailService<S, F>
fn bail<F>(self, preprocessor: F) -> BailService<S, F>
Provide a pre-processor which returns either
Ok(req)
with a moditied request, or Err(res) with the desired
immediate response. This pre-processor is synchronous.