Struct OnUpgrade
pub struct OnUpgrade { /* private fields */ }
A future for a possible HTTP upgrade.
If no upgrade was available, or it doesn't succeed, yields an Error.
Trait Implementations
impl Clone for OnUpgrade
fn clone(&self) -> OnUpgrade
impl Debug for OnUpgrade
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Future for OnUpgrade
type Output = Result<Upgraded, Error>;fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Auto Trait Implementations
impl Freeze for OnUpgrade
impl RefUnwindSafe for OnUpgrade
impl Send for OnUpgrade
impl Sync for OnUpgrade
impl Unpin for OnUpgrade
impl UnsafeUnpin for OnUpgrade
impl UnwindSafe for OnUpgrade
Blanket Implementations
impl<F> IntoFuture for OnUpgrade
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 OnUpgrade
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 OnUpgrade
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for OnUpgrade
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for OnUpgrade
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for OnUpgrade
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for OnUpgrade
fn from(t: T) -> TReturns the argument unchanged.
impl<T> FutureExt for OnUpgrade
where
T: Future + ?Sized,
impl<T> Instrument for OnUpgrade
impl<T> ToOwned for OnUpgrade
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> WithSubscriber for OnUpgrade
impl<T, U> Into<U> for OnUpgrade
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 OnUpgrade
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for OnUpgrade
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>