UpgradeInfo

Trait UpgradeInfo 

Source
pub trait UpgradeInfo {
    type Info: ProtocolName + Clone;
    type InfoIter: IntoIterator<Item = Self::Info>;

    // Required method
    fn protocol_info(&self) -> Self::InfoIter;
}
Expand description

Common trait for upgrades that can be applied on inbound substreams, outbound substreams, or both.

Required Associated Types§

Source

type Info: ProtocolName + Clone

Opaque type representing a negotiable protocol.

Source

type InfoIter: IntoIterator<Item = Self::Info>

Iterator returned by protocol_info.

Required Methods§

Source

fn protocol_info(&self) -> Self::InfoIter

Returns the list of protocols that are supported. Used during the negotiation process.

Implementors§

Source§

impl UpgradeInfo for DeniedUpgrade

Source§

impl<A, B> UpgradeInfo for EitherUpgrade<A, B>
where A: UpgradeInfo, B: UpgradeInfo,

Source§

impl<A, B> UpgradeInfo for SelectUpgrade<A, B>
where A: UpgradeInfo, B: UpgradeInfo,

Source§

impl<P, F> UpgradeInfo for FromFnUpgrade<P, F>
where P: ProtocolName + Clone,

Source§

impl<T> UpgradeInfo for OptionalUpgrade<T>
where T: UpgradeInfo,

Source§

impl<U, F> UpgradeInfo for MapInboundUpgrade<U, F>
where U: UpgradeInfo,

Source§

impl<U, F> UpgradeInfo for MapInboundUpgradeErr<U, F>
where U: UpgradeInfo,

Source§

impl<U, F> UpgradeInfo for MapOutboundUpgrade<U, F>
where U: UpgradeInfo,

Source§

impl<U, F> UpgradeInfo for MapOutboundUpgradeErr<U, F>
where U: UpgradeInfo,