pub struct SelectUpgrade<A, B>(/* private fields */);
Implementations§
Source§impl<A, B> SelectUpgrade<A, B>
impl<A, B> SelectUpgrade<A, B>
Trait Implementations§
Source§impl<A: Clone, B: Clone> Clone for SelectUpgrade<A, B>
impl<A: Clone, B: Clone> Clone for SelectUpgrade<A, B>
Source§fn clone(&self) -> SelectUpgrade<A, B>
fn clone(&self) -> SelectUpgrade<A, B>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<C, A, B, TA, TB, EA, EB> Upgrade<C> for SelectUpgrade<A, B>
impl<C, A, B, TA, TB, EA, EB> Upgrade<C> for SelectUpgrade<A, B>
type Output = Either<TA, TB>
type Error = Either<EA, EB>
type Future = EitherFuture<<A as Upgrade<C>>::Future, <B as Upgrade<C>>::Future>
Source§fn upgrade_inbound(self, stream: C, info: Self::Info) -> Self::Future
fn upgrade_inbound(self, stream: C, info: Self::Info) -> Self::Future
升级入站流
Source§fn upgrade_outbound(self, stream: C, info: Self::Info) -> Self::Future
fn upgrade_outbound(self, stream: C, info: Self::Info) -> Self::Future
升级出站流
Source§impl<A, B> UpgradeInfo for SelectUpgrade<A, B>where
A: UpgradeInfo,
B: UpgradeInfo,
impl<A, B> UpgradeInfo for SelectUpgrade<A, B>where
A: UpgradeInfo,
B: UpgradeInfo,
type Info = Either<<A as UpgradeInfo>::Info, <B as UpgradeInfo>::Info>
type InfoIter = Chain<Map<<<A as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter, fn(<A as UpgradeInfo>::Info) -> <SelectUpgrade<A, B> as UpgradeInfo>::Info>, Map<<<B as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter, fn(<B as UpgradeInfo>::Info) -> <SelectUpgrade<A, B> as UpgradeInfo>::Info>>
fn protocol_info(&self) -> Self::InfoIter
Auto Trait Implementations§
impl<A, B> Freeze for SelectUpgrade<A, B>
impl<A, B> RefUnwindSafe for SelectUpgrade<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for SelectUpgrade<A, B>
impl<A, B> Sync for SelectUpgrade<A, B>
impl<A, B> Unpin for SelectUpgrade<A, B>
impl<A, B> UnwindSafe for SelectUpgrade<A, B>where
A: UnwindSafe,
B: 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<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