Struct libp2p::floodsub::protocol::FloodsubProtocol
source · pub struct FloodsubProtocol {}
Available on crate feature
floodsub
only.Expand description
Implementation of ConnectionUpgrade
for the floodsub protocol.
Implementations§
source§impl FloodsubProtocol
impl FloodsubProtocol
sourcepub fn new() -> FloodsubProtocol
pub fn new() -> FloodsubProtocol
Builds a new FloodsubProtocol
.
Trait Implementations§
source§impl Clone for FloodsubProtocol
impl Clone for FloodsubProtocol
source§fn clone(&self) -> FloodsubProtocol
fn clone(&self) -> FloodsubProtocol
Returns a copy 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 Debug for FloodsubProtocol
impl Debug for FloodsubProtocol
source§impl Default for FloodsubProtocol
impl Default for FloodsubProtocol
source§fn default() -> FloodsubProtocol
fn default() -> FloodsubProtocol
Returns the “default value” for a type. Read more
source§impl<TSocket> InboundUpgrade<TSocket> for FloodsubProtocolwhere
TSocket: AsyncRead + AsyncWrite + Send + Unpin + 'static,
impl<TSocket> InboundUpgrade<TSocket> for FloodsubProtocolwhere TSocket: AsyncRead + AsyncWrite + Send + Unpin + 'static,
§type Output = FloodsubRpc
type Output = FloodsubRpc
Output after the upgrade has been successfully negotiated and the handshake performed.
§type Error = FloodsubDecodeError
type Error = FloodsubDecodeError
Possible error during the handshake.
§type Future = Pin<Box<dyn Future<Output = Result<<FloodsubProtocol as InboundUpgrade<TSocket>>::Output, <FloodsubProtocol as InboundUpgrade<TSocket>>::Error>> + Send + 'static, Global>>
type Future = Pin<Box<dyn Future<Output = Result<<FloodsubProtocol as InboundUpgrade<TSocket>>::Output, <FloodsubProtocol as InboundUpgrade<TSocket>>::Error>> + Send + 'static, Global>>
Future that performs the handshake with the remote.
source§fn upgrade_inbound(
self,
socket: TSocket,
_: <FloodsubProtocol as UpgradeInfo>::Info
) -> <FloodsubProtocol as InboundUpgrade<TSocket>>::Future
fn upgrade_inbound( self, socket: TSocket, _: <FloodsubProtocol as UpgradeInfo>::Info ) -> <FloodsubProtocol as InboundUpgrade<TSocket>>::Future
After we have determined that the remote supports one of the protocols we support, this
method is called to start the handshake. Read more
source§impl UpgradeInfo for FloodsubProtocol
impl UpgradeInfo for FloodsubProtocol
§type InfoIter = Once<<FloodsubProtocol as UpgradeInfo>::Info>
type InfoIter = Once<<FloodsubProtocol as UpgradeInfo>::Info>
Iterator returned by
protocol_info
.source§fn protocol_info(&self) -> <FloodsubProtocol as UpgradeInfo>::InfoIter
fn protocol_info(&self) -> <FloodsubProtocol as UpgradeInfo>::InfoIter
Returns the list of protocols that are supported. Used during the negotiation process.
Auto Trait Implementations§
impl RefUnwindSafe for FloodsubProtocol
impl Send for FloodsubProtocol
impl Sync for FloodsubProtocol
impl Unpin for FloodsubProtocol
impl UnwindSafe for FloodsubProtocol
Blanket Implementations§
§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
source§impl<C, U> InboundUpgradeExt<C> for Uwhere
U: InboundUpgrade<C>,
impl<C, U> InboundUpgradeExt<C> for Uwhere U: InboundUpgrade<C>,
source§fn map_inbound<F, T>(self, f: F) -> MapInboundUpgrade<Self, F>where
Self: Sized,
F: FnOnce(Self::Output) -> T,
fn map_inbound<F, T>(self, f: F) -> MapInboundUpgrade<Self, F>where Self: Sized, F: FnOnce(Self::Output) -> T,
Returns a new object that wraps around
Self
and applies a closure to the Output
.source§fn map_inbound_err<F, T>(self, f: F) -> MapInboundUpgradeErr<Self, F>where
Self: Sized,
F: FnOnce(Self::Error) -> T,
fn map_inbound_err<F, T>(self, f: F) -> MapInboundUpgradeErr<Self, F>where Self: Sized, F: FnOnce(Self::Error) -> T,
Returns a new object that wraps around
Self
and applies a closure to the Error
.source§impl<T, TInfo> InboundUpgradeSend for Twhere
T: InboundUpgrade<Negotiated<SubstreamBox>, Info = TInfo> + UpgradeInfoSend<Info = TInfo>,
TInfo: ProtocolName + Clone + Send + 'static,
<T as InboundUpgrade<Negotiated<SubstreamBox>>>::Output: Send + 'static,
<T as InboundUpgrade<Negotiated<SubstreamBox>>>::Error: Send + 'static,
<T as InboundUpgrade<Negotiated<SubstreamBox>>>::Future: Send + 'static,
impl<T, TInfo> InboundUpgradeSend for Twhere T: InboundUpgrade<Negotiated<SubstreamBox>, Info = TInfo> + UpgradeInfoSend<Info = TInfo>, TInfo: ProtocolName + Clone + Send + 'static, <T as InboundUpgrade<Negotiated<SubstreamBox>>>::Output: Send + 'static, <T as InboundUpgrade<Negotiated<SubstreamBox>>>::Error: Send + 'static, <T as InboundUpgrade<Negotiated<SubstreamBox>>>::Future: Send + 'static,
§type Output = <T as InboundUpgrade<Negotiated<SubstreamBox>>>::Output
type Output = <T as InboundUpgrade<Negotiated<SubstreamBox>>>::Output
Equivalent to
InboundUpgrade::Output
.§type Error = <T as InboundUpgrade<Negotiated<SubstreamBox>>>::Error
type Error = <T as InboundUpgrade<Negotiated<SubstreamBox>>>::Error
Equivalent to
InboundUpgrade::Error
.§type Future = <T as InboundUpgrade<Negotiated<SubstreamBox>>>::Future
type Future = <T as InboundUpgrade<Negotiated<SubstreamBox>>>::Future
Equivalent to
InboundUpgrade::Future
.source§fn upgrade_inbound(
self,
socket: Negotiated<SubstreamBox>,
info: TInfo
) -> <T as InboundUpgradeSend>::Future
fn upgrade_inbound( self, socket: Negotiated<SubstreamBox>, info: TInfo ) -> <T as InboundUpgradeSend>::Future
Equivalent to
InboundUpgrade::upgrade_inbound
.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> UpgradeInfoSend for Twhere
T: UpgradeInfo + Send + 'static,
<T as UpgradeInfo>::Info: Send + 'static,
<<T as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: Send + 'static,
impl<T> UpgradeInfoSend for Twhere T: UpgradeInfo + Send + 'static, <T as UpgradeInfo>::Info: Send + 'static, <<T as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: Send + 'static,
§type Info = <T as UpgradeInfo>::Info
type Info = <T as UpgradeInfo>::Info
Equivalent to
UpgradeInfo::Info
.§type InfoIter = <<T as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter
type InfoIter = <<T as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter
Equivalent to
UpgradeInfo::InfoIter
.source§fn protocol_info(&self) -> <T as UpgradeInfoSend>::InfoIter
fn protocol_info(&self) -> <T as UpgradeInfoSend>::InfoIter
Equivalent to
UpgradeInfo::protocol_info
.