pub struct Upgrade<K, H> { /* private fields */ }
Expand description
Inbound and outbound upgrade for all ProtocolsHandler
s.
Trait Implementations
sourceimpl<K, H> InboundUpgradeSend for Upgrade<K, H> where
H: InboundUpgradeSend,
K: 'static + Send,
impl<K, H> InboundUpgradeSend for Upgrade<K, H> where
H: InboundUpgradeSend,
K: 'static + Send,
type Output = (K, <H as InboundUpgradeSend>::Output)
type Output = (K, <H as InboundUpgradeSend>::Output)
Equivalent to InboundUpgrade::Output
.
type Error = (K, <H as InboundUpgradeSend>::Error)
type Error = (K, <H as InboundUpgradeSend>::Error)
Equivalent to InboundUpgrade::Error
.
type Future = Pin<Box<dyn Future<Output = Result<<Upgrade<K, H> as InboundUpgradeSend>::Output, <Upgrade<K, H> as InboundUpgradeSend>::Error>> + Send + 'static, Global>>
type Future = Pin<Box<dyn Future<Output = Result<<Upgrade<K, H> as InboundUpgradeSend>::Output, <Upgrade<K, H> as InboundUpgradeSend>::Error>> + Send + 'static, Global>>
Equivalent to InboundUpgrade::Future
.
sourcepub fn upgrade_inbound(
self,
resource: Negotiated<SubstreamRef<Arc<StreamMuxerBox>>>,
info: <Upgrade<K, H> as UpgradeInfoSend>::Info
) -> <Upgrade<K, H> as InboundUpgradeSend>::Future
pub fn upgrade_inbound(
self,
resource: Negotiated<SubstreamRef<Arc<StreamMuxerBox>>>,
info: <Upgrade<K, H> as UpgradeInfoSend>::Info
) -> <Upgrade<K, H> as InboundUpgradeSend>::Future
Equivalent to InboundUpgrade::upgrade_inbound
.
sourceimpl<K, H> OutboundUpgradeSend for Upgrade<K, H> where
H: OutboundUpgradeSend,
K: 'static + Send,
impl<K, H> OutboundUpgradeSend for Upgrade<K, H> where
H: OutboundUpgradeSend,
K: 'static + Send,
type Output = (K, <H as OutboundUpgradeSend>::Output)
type Output = (K, <H as OutboundUpgradeSend>::Output)
Equivalent to OutboundUpgrade::Output
.
type Error = (K, <H as OutboundUpgradeSend>::Error)
type Error = (K, <H as OutboundUpgradeSend>::Error)
Equivalent to OutboundUpgrade::Error
.
type Future = Pin<Box<dyn Future<Output = Result<<Upgrade<K, H> as OutboundUpgradeSend>::Output, <Upgrade<K, H> as OutboundUpgradeSend>::Error>> + Send + 'static, Global>>
type Future = Pin<Box<dyn Future<Output = Result<<Upgrade<K, H> as OutboundUpgradeSend>::Output, <Upgrade<K, H> as OutboundUpgradeSend>::Error>> + Send + 'static, Global>>
Equivalent to OutboundUpgrade::Future
.
sourcepub fn upgrade_outbound(
self,
resource: Negotiated<SubstreamRef<Arc<StreamMuxerBox>>>,
info: <Upgrade<K, H> as UpgradeInfoSend>::Info
) -> <Upgrade<K, H> as OutboundUpgradeSend>::Future
pub fn upgrade_outbound(
self,
resource: Negotiated<SubstreamRef<Arc<StreamMuxerBox>>>,
info: <Upgrade<K, H> as UpgradeInfoSend>::Info
) -> <Upgrade<K, H> as OutboundUpgradeSend>::Future
Equivalent to OutboundUpgrade::upgrade_outbound
.
sourceimpl<K, H> UpgradeInfoSend for Upgrade<K, H> where
H: UpgradeInfoSend,
K: 'static + Send,
impl<K, H> UpgradeInfoSend for Upgrade<K, H> where
H: UpgradeInfoSend,
K: 'static + Send,
type Info = IndexedProtoName<<H as UpgradeInfoSend>::Info>
type Info = IndexedProtoName<<H as UpgradeInfoSend>::Info>
Equivalent to UpgradeInfo::Info
.
type InfoIter = IntoIter<<Upgrade<K, H> as UpgradeInfoSend>::Info, Global>
type InfoIter = IntoIter<<Upgrade<K, H> as UpgradeInfoSend>::Info, Global>
Equivalent to UpgradeInfo::InfoIter
.
sourcepub fn protocol_info(&self) -> <Upgrade<K, H> as UpgradeInfoSend>::InfoIter
pub fn protocol_info(&self) -> <Upgrade<K, H> as UpgradeInfoSend>::InfoIter
Equivalent to UpgradeInfo::protocol_info
.
Auto Trait Implementations
impl<K, H> RefUnwindSafe for Upgrade<K, H> where
H: RefUnwindSafe,
K: RefUnwindSafe,
impl<K, H> Send for Upgrade<K, H> where
H: Send,
K: Send,
impl<K, H> Sync for Upgrade<K, H> where
H: Sync,
K: Sync,
impl<K, H> Unpin for Upgrade<K, H> where
H: Unpin,
K: Unpin,
impl<K, H> UnwindSafe for Upgrade<K, H> where
H: UnwindSafe,
K: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more