pub struct UpgradeService<S, State, O> { /* private fields */ }
Expand description
Upgrade service can be used to handle the possibility of upgrading a request, after which it will pass down the transport RW to the attached upgrade service.
Implementations§
Source§impl<S, State, O> UpgradeService<S, State, O>
impl<S, State, O> UpgradeService<S, State, O>
Sourcepub const fn new(handlers: Vec<Arc<UpgradeHandler<State, O>>>, inner: S) -> Self
pub const fn new(handlers: Vec<Arc<UpgradeHandler<State, O>>>, inner: S) -> Self
Create a new UpgradeService
.
Sourcepub fn into_inner(self) -> S
pub fn into_inner(self) -> S
Consumes self
, returning the underlying service.
Trait Implementations§
Source§impl<S, State, O> Clone for UpgradeService<S, State, O>where
S: Clone,
impl<S, State, O> Clone for UpgradeService<S, State, O>where
S: Clone,
Source§impl<S, State, O> Debug for UpgradeService<S, State, O>where
S: Debug,
impl<S, State, O> Debug for UpgradeService<S, State, O>where
S: Debug,
Auto Trait Implementations§
impl<S, State, O> Freeze for UpgradeService<S, State, O>where
S: Freeze,
impl<S, State, O> !RefUnwindSafe for UpgradeService<S, State, O>
impl<S, State, O> Send for UpgradeService<S, State, O>where
S: Send,
impl<S, State, O> Sync for UpgradeService<S, State, O>where
S: Sync,
impl<S, State, O> Unpin for UpgradeService<S, State, O>where
S: Unpin,
impl<S, State, O> !UnwindSafe for UpgradeService<S, State, O>
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
ConnectorService
Source§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<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>
Converts
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>
Converts
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