#[non_exhaustive]pub struct HaProxyLayer { /* private fields */ }Expand description
Layer to decode the HaProxy Protocol
Implementations§
Source§impl HaProxyLayer
impl HaProxyLayer
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Create a new HaProxyLayer.
Sourcepub fn with_peek(self, value: bool) -> Self
pub fn with_peek(self, value: bool) -> Self
Instruct HaProxyLayer to peek prior to comitting to the HaProxy protocol.
Doing so makes it possible to support traffic with or without the use of that data. This can be useful to run services locally (not behind a loadbalancer) as well as in the the cloud (production, behind a loadbalancer).
Sourcepub fn set_peek(&mut self, value: bool) -> &mut Self
pub fn set_peek(&mut self, value: bool) -> &mut Self
Instruct HaProxyLayer to peek prior to comitting to the HaProxy protocol.
Doing so makes it possible to support traffic with or without the use of that data. This can be useful to run services locally (not behind a loadbalancer) as well as in the the cloud (production, behind a loadbalancer).
Sourcepub fn with_strictness(self, value: HaProxyStrictness) -> Self
pub fn with_strictness(self, value: HaProxyStrictness) -> Self
Override the strictness configuration applied to incoming PROXY headers.
Sourcepub fn set_strictness(&mut self, value: HaProxyStrictness) -> &mut Self
pub fn set_strictness(&mut self, value: HaProxyStrictness) -> &mut Self
Override the strictness configuration applied to incoming PROXY headers.
Trait Implementations§
Source§impl Clone for HaProxyLayer
impl Clone for HaProxyLayer
Source§impl Debug for HaProxyLayer
impl Debug for HaProxyLayer
Source§impl Default for HaProxyLayer
impl Default for HaProxyLayer
Source§impl<S> Layer<S> for HaProxyLayer
impl<S> Layer<S> for HaProxyLayer
Source§type Service = HaProxyService<S>
type Service = HaProxyService<S>
Source§fn layer(&self, inner: S) -> Self::Service
fn layer(&self, inner: S) -> Self::Service
Source§fn into_layer(self, inner: S) -> Self::Service
fn into_layer(self, inner: S) -> Self::Service
layer but consuming self after the service was created. Read moreAuto Trait Implementations§
impl Freeze for HaProxyLayer
impl RefUnwindSafe for HaProxyLayer
impl Send for HaProxyLayer
impl Sync for HaProxyLayer
impl Unpin for HaProxyLayer
impl UnsafeUnpin for HaProxyLayer
impl UnwindSafe for HaProxyLayer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more