Struct libp2p::floodsub::protocol::FloodsubProtocol [−][src]
pub struct FloodsubProtocol {}Expand description
Implementation of ConnectionUpgrade for the floodsub protocol.
Implementations
Builds a new FloodsubProtocol.
Trait Implementations
Returns the “default value” for a type. Read more
impl<TSocket> InboundUpgrade<TSocket> for FloodsubProtocol where
TSocket: AsyncRead + AsyncWrite + Send + Unpin + 'static, [src]
impl<TSocket> InboundUpgrade<TSocket> for FloodsubProtocol where
TSocket: AsyncRead + AsyncWrite + Send + Unpin + 'static, [src]type Output = FloodsubRpc
type Output = FloodsubRpcOutput after the upgrade has been successfully negotiated and the handshake performed.
type Error = FloodsubDecodeError
type Error = FloodsubDecodeErrorPossible error during the handshake.
type Future = Pin<Box<dyn Future<Output = Result<<FloodsubProtocol as InboundUpgrade<TSocket>>::Output, <FloodsubProtocol as InboundUpgrade<TSocket>>::Error>> + 'static + Send, Global>>
type Future = Pin<Box<dyn Future<Output = Result<<FloodsubProtocol as InboundUpgrade<TSocket>>::Output, <FloodsubProtocol as InboundUpgrade<TSocket>>::Error>> + 'static + Send, Global>>Future that performs the handshake with the remote.
pub fn upgrade_inbound(
self,
socket: TSocket,
<FloodsubProtocol as UpgradeInfo>::Info
) -> <FloodsubProtocol as InboundUpgrade<TSocket>>::Future[src]
pub fn upgrade_inbound(
self,
socket: TSocket,
<FloodsubProtocol as UpgradeInfo>::Info
) -> <FloodsubProtocol as InboundUpgrade<TSocket>>::Future[src]After we have determined that the remote supports one of the protocols we support, this method is called to start the handshake. Read more
type Info = &'static [u8]
type Info = &'static [u8]Opaque type representing a negotiable protocol.
type InfoIter = Once<<FloodsubProtocol as UpgradeInfo>::Info>
type InfoIter = Once<<FloodsubProtocol as UpgradeInfo>::Info>Iterator returned by protocol_info.
Returns the list of protocols that are supported. Used during the negotiation process.
Auto Trait Implementations
impl RefUnwindSafe for FloodsubProtocolimpl Send for FloodsubProtocolimpl Sync for FloodsubProtocolimpl Unpin for FloodsubProtocolimpl UnwindSafe for FloodsubProtocolBlanket Implementations
Mutably borrows from an owned value. Read more
fn map_inbound<F, T>(self, f: F) -> MapInboundUpgrade<Self, F> where
F: FnOnce(Self::Output) -> T, [src]
fn map_inbound<F, T>(self, f: F) -> MapInboundUpgrade<Self, F> where
F: FnOnce(Self::Output) -> T, [src]Returns a new object that wraps around Self and applies a closure to the Output.
fn map_inbound_err<F, T>(self, f: F) -> MapInboundUpgradeErr<Self, F> where
F: FnOnce(Self::Error) -> T, [src]
fn map_inbound_err<F, T>(self, f: F) -> MapInboundUpgradeErr<Self, F> where
F: FnOnce(Self::Error) -> T, [src]Returns a new object that wraps around Self and applies a closure to the Error.
pub fn vzip(self) -> V