pub struct HaProxyService<S> { /* private fields */ }Expand description
Service to decode the HaProxy Protocol
This service will decode the HaProxy Protocol header and pass the decoded information to the inner service.
Implementations§
Source§impl<S> HaProxyService<S>
impl<S> HaProxyService<S>
Sourcepub const fn new(inner: S) -> Self
pub const fn new(inner: S) -> Self
Create a new HaProxyService with the given inner service.
Trait Implementations§
Source§impl<S: Clone> Clone for HaProxyService<S>
impl<S: Clone> Clone for HaProxyService<S>
Source§impl<S: Debug> Debug for HaProxyService<S>
impl<S: Debug> Debug for HaProxyService<S>
Source§impl<State, S, IO> Service<State, IO> for HaProxyService<S>
impl<State, S, IO> Service<State, IO> for HaProxyService<S>
Source§type Response = <S as Service<State, Join<ChainReader<HeapReader, ReadHalf<IO>>, WriteHalf<IO>>>>::Response
type Response = <S as Service<State, Join<ChainReader<HeapReader, ReadHalf<IO>>, WriteHalf<IO>>>>::Response
The type of response returned by the service.
Auto Trait Implementations§
impl<S> Freeze for HaProxyService<S>where
S: Freeze,
impl<S> RefUnwindSafe for HaProxyService<S>where
S: RefUnwindSafe,
impl<S> Send for HaProxyService<S>where
S: Send,
impl<S> Sync for HaProxyService<S>where
S: Sync,
impl<S> Unpin for HaProxyService<S>where
S: Unpin,
impl<S> UnwindSafe for HaProxyService<S>where
S: UnwindSafe,
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<S, State, Request, Connection> ConnectorService<State, Request> for S
impl<S, State, Request, Connection> ConnectorService<State, Request> for S
Source§type Connection = Connection
type Connection = Connection
Connection returned by the
ConnectorServiceSource§type Error = <S as Service<State, Request>>::Error
type Error = <S as Service<State, Request>>::Error
Error returned in case of connection / setup failure
Source§fn connect(
&self,
ctx: Context<State>,
req: Request,
) -> impl Future<Output = Result<EstablishedClientConnection<<S as ConnectorService<State, Request>>::Connection, State, Request>, <S as ConnectorService<State, Request>>::Error>> + Send
fn connect( &self, ctx: Context<State>, req: Request, ) -> impl Future<Output = Result<EstablishedClientConnection<<S as ConnectorService<State, Request>>::Connection, State, Request>, <S as ConnectorService<State, Request>>::Error>> + Send
Establish a connection, which often involves some kind of handshake,
or connection revival.
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<S, StateIn, StateOut, RequestIn, RequestOut> RequestInspector<StateIn, RequestIn> for S
impl<S, StateIn, StateOut, RequestIn, RequestOut> RequestInspector<StateIn, RequestIn> for S
Source§type Error = <S as Service<StateIn, RequestIn>>::Error
type Error = <S as Service<StateIn, RequestIn>>::Error
The type of error returned by the service.
type RequestOut = RequestOut
type StateOut = StateOut
Source§fn inspect_request(
&self,
ctx: Context<StateIn>,
req: RequestIn,
) -> impl Future<Output = Result<(Context<<S as RequestInspector<StateIn, RequestIn>>::StateOut>, <S as RequestInspector<StateIn, RequestIn>>::RequestOut), <S as RequestInspector<StateIn, RequestIn>>::Error>> + Send
fn inspect_request( &self, ctx: Context<StateIn>, req: RequestIn, ) -> impl Future<Output = Result<(Context<<S as RequestInspector<StateIn, RequestIn>>::StateOut>, <S as RequestInspector<StateIn, RequestIn>>::RequestOut), <S as RequestInspector<StateIn, RequestIn>>::Error>> + Send
Inspect the request, modify it if needed or desired, and return it.