Struct libp2p_floodsub::protocol::FloodsubProtocol
source · pub struct FloodsubProtocol {}
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§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) -> Self::InfoIter
fn protocol_info(&self) -> Self::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§
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
.