Struct UpgradeableConnection
#[must_use = "futures do nothing unless polled"]
pub struct UpgradeableConnection<T, S>
where
S: HttpService<Incoming>, { /* private fields */ }
A future binding a connection with a Service with Upgrade support.
Implementations
impl<I, B, S> UpgradeableConnection<I, S>
where
S: HttpService<Incoming, ResBody = B>,
S::Error: Into<Box<dyn StdError + Send + Sync>>,
I: Read + Write + Unpin,
B: Body + 'static,
B::Error: Into<Box<dyn StdError + Send + Sync>>,
fn graceful_shutdown(self: Pin<&mut Self>)Start a graceful shutdown process for this connection.
This
Connectionshould continue to be polled until shutdown can finish.fn into_parts(self) -> Option<Parts<I, S>>Return the inner IO object, and additional information provided the connection has not yet been upgraded.
Trait Implementations
impl<I, B, S> Future for UpgradeableConnection<I, S>
where
S: HttpService<Incoming, ResBody = B>,
S::Error: Into<Box<dyn StdError + Send + Sync>>,
I: Read + Write + Unpin + Send + 'static,
B: Body + 'static,
B::Error: Into<Box<dyn StdError + Send + Sync>>,
type Output = Result<(), Error>;fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Auto Trait Implementations
impl<T, S> !RefUnwindSafe for UpgradeableConnection<T, S>
impl<T, S> !UnwindSafe for UpgradeableConnection<T, S>
impl<T, S> Freeze for UpgradeableConnection<T, S>
where
Option<Connection<T, S>>: Freeze,
impl<T, S> Send for UpgradeableConnection<T, S>
where
Option<Connection<T, S>>: Send,
impl<T, S> Sync for UpgradeableConnection<T, S>
where
Option<Connection<T, S>>: Sync,
impl<T, S> Unpin for UpgradeableConnection<T, S>
where
Option<Connection<T, S>>: Unpin,
impl<T, S> UnsafeUnpin for UpgradeableConnection<T, S>
where
Option<Connection<T, S>>: UnsafeUnpin,
Blanket Implementations
impl<F> IntoFuture for UpgradeableConnection<T, S>
where
F: Future,
type Output = <F as Future>::Output;type IntoFuture = F;fn into_future(self) -> <F as IntoFuture>::IntoFuture
impl<F, T, E> TryFuture for UpgradeableConnection<T, S>
where
F: Future<Output = Result<T, E>> + ?Sized,
type Ok = T;type Error = E;fn try_poll(self: Pin<&mut F>, cx: &mut Context<'_>) -> Poll<<F as Future>::Output>
impl<T> Any for UpgradeableConnection<T, S>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for UpgradeableConnection<T, S>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for UpgradeableConnection<T, S>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for UpgradeableConnection<T, S>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> FutureExt for UpgradeableConnection<T, S>
where
T: Future + ?Sized,
impl<T> Instrument for UpgradeableConnection<T, S>
impl<T> WithSubscriber for UpgradeableConnection<T, S>
impl<T, U> Into<U> for UpgradeableConnection<T, S>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for UpgradeableConnection<T, S>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for UpgradeableConnection<T, S>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>