Trait libp2p::core::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§
sourcetype Info: ProtocolName + Clone
type Info: ProtocolName + Clone
Opaque type representing a negotiable protocol.
sourcetype InfoIter: IntoIterator<Item = Self::Info>
type InfoIter: IntoIterator<Item = Self::Info>
Iterator returned by protocol_info
.
Required Methods§
sourcefn protocol_info(&self) -> Self::InfoIter
fn protocol_info(&self) -> Self::InfoIter
Returns the list of protocols that are supported. Used during the negotiation process.
Implementors§
source§impl UpgradeInfo for DeflateConfig
impl UpgradeInfo for DeflateConfig
type Info = &'static [u8]
type InfoIter = Once<<DeflateConfig as UpgradeInfo>::Info>
source§impl UpgradeInfo for FloodsubProtocol
impl UpgradeInfo for FloodsubProtocol
type Info = &'static [u8]
type InfoIter = Once<<FloodsubProtocol as UpgradeInfo>::Info>
source§impl UpgradeInfo for FloodsubRpc
impl UpgradeInfo for FloodsubRpc
type Info = &'static [u8]
type InfoIter = Once<<FloodsubRpc as UpgradeInfo>::Info>
source§impl UpgradeInfo for ProtocolConfig
impl UpgradeInfo for ProtocolConfig
type Info = ProtocolId
type InfoIter = Vec<<ProtocolConfig as UpgradeInfo>::Info, Global>
source§impl UpgradeInfo for KademliaProtocolConfig
impl UpgradeInfo for KademliaProtocolConfig
source§impl UpgradeInfo for MplexConfig
impl UpgradeInfo for MplexConfig
type Info = &'static [u8]
type InfoIter = Once<<MplexConfig as UpgradeInfo>::Info>
source§impl UpgradeInfo for NoiseConfig<IX, X25519, ()>
impl UpgradeInfo for NoiseConfig<IX, X25519, ()>
source§impl UpgradeInfo for NoiseConfig<IX, X25519Spec, ()>
impl UpgradeInfo for NoiseConfig<IX, X25519Spec, ()>
Note: This is not currentlyy a standardised upgrade.
type Info = &'static [u8]
type InfoIter = Once<<NoiseConfig<IX, X25519Spec, ()> as UpgradeInfo>::Info>
source§impl UpgradeInfo for NoiseConfig<XX, X25519, ()>
impl UpgradeInfo for NoiseConfig<XX, X25519, ()>
source§impl UpgradeInfo for NoiseConfig<XX, X25519Spec, ()>
impl UpgradeInfo for NoiseConfig<XX, X25519Spec, ()>
type Info = &'static [u8]
type InfoIter = Once<<NoiseConfig<XX, X25519Spec, ()> as UpgradeInfo>::Info>
source§impl UpgradeInfo for PlainText1Config
impl UpgradeInfo for PlainText1Config
type Info = &'static [u8]
type InfoIter = Once<<PlainText1Config as UpgradeInfo>::Info>
source§impl UpgradeInfo for PlainText2Config
impl UpgradeInfo for PlainText2Config
type Info = &'static [u8]
type InfoIter = Once<<PlainText2Config as UpgradeInfo>::Info>
source§impl UpgradeInfo for Config
impl UpgradeInfo for Config
source§impl UpgradeInfo for YamuxConfig
impl UpgradeInfo for YamuxConfig
type Info = &'static [u8]
type InfoIter = Once<<YamuxConfig as UpgradeInfo>::Info>
source§impl UpgradeInfo for YamuxLocalConfig
impl UpgradeInfo for YamuxLocalConfig
type Info = &'static [u8]
type InfoIter = Once<<YamuxLocalConfig as UpgradeInfo>::Info>
source§impl UpgradeInfo for DeniedUpgrade
impl UpgradeInfo for DeniedUpgrade
type Info = &'static [u8]
type InfoIter = Empty<<DeniedUpgrade as UpgradeInfo>::Info>
source§impl<A, B> UpgradeInfo for EitherUpgrade<A, B>where
A: UpgradeInfo,
B: UpgradeInfo,
impl<A, B> UpgradeInfo for EitherUpgrade<A, B>where A: UpgradeInfo, B: UpgradeInfo,
type Info = EitherName<<A as UpgradeInfo>::Info, <B as UpgradeInfo>::Info>
type InfoIter = EitherIter<<<A as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter, <<B as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter>
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 = EitherName<<A as UpgradeInfo>::Info, <B as UpgradeInfo>::Info>
type InfoIter = InfoIterChain<<<A as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter, <<B as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter>
source§impl<F> UpgradeInfo for SimpleProtocol<F>
impl<F> UpgradeInfo for SimpleProtocol<F>
type Info = Bytes
type InfoIter = Once<<SimpleProtocol<F> as UpgradeInfo>::Info>
source§impl<P> UpgradeInfo for PendingUpgrade<P>where
P: ProtocolName + Clone,
impl<P> UpgradeInfo for PendingUpgrade<P>where P: ProtocolName + Clone,
source§impl<P> UpgradeInfo for ReadyUpgrade<P>where
P: ProtocolName + Clone,
impl<P> UpgradeInfo for ReadyUpgrade<P>where P: ProtocolName + Clone,
source§impl<P, C, R> UpgradeInfo for NoiseAuthenticated<P, C, R>where
C: Zeroize,
NoiseConfig<P, C, R>: UpgradeInfo,
impl<P, C, R> UpgradeInfo for NoiseAuthenticated<P, C, R>where C: Zeroize, NoiseConfig<P, C, R>: UpgradeInfo,
type Info = <NoiseConfig<P, C, R> as UpgradeInfo>::Info
type InfoIter = <NoiseConfig<P, C, R> as UpgradeInfo>::InfoIter
source§impl<P, F> UpgradeInfo for FromFnUpgrade<P, F>where
P: ProtocolName + Clone,
impl<P, F> UpgradeInfo for FromFnUpgrade<P, F>where P: ProtocolName + Clone,
source§impl<R> UpgradeInfo for NoiseConfig<IK, X25519, R>
impl<R> UpgradeInfo for NoiseConfig<IK, X25519, R>
source§impl<R> UpgradeInfo for NoiseConfig<IK, X25519Spec, R>
impl<R> UpgradeInfo for NoiseConfig<IK, X25519Spec, R>
Note: This is not currently a standardised upgrade.