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 = FloodsubError
type Error = FloodsubError
Possible error during the handshake.
§type Future = Pin<Box<dyn Future<Output = Result<<FloodsubProtocol as InboundUpgrade<TSocket>>::Output, <FloodsubProtocol as InboundUpgrade<TSocket>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<FloodsubProtocol as InboundUpgrade<TSocket>>::Output, <FloodsubProtocol as InboundUpgrade<TSocket>>::Error>> + Send>>
Future that performs the handshake with the remote.
source§impl UpgradeInfo for FloodsubProtocol
impl UpgradeInfo for FloodsubProtocol
§type Info = StreamProtocol
type Info = StreamProtocol
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
.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<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T, TInfo> InboundUpgradeSend for Twhere
T: InboundUpgrade<Stream, Info = TInfo> + UpgradeInfoSend<Info = TInfo>,
TInfo: AsRef<str> + Clone + Send + 'static,
<T as InboundUpgrade<Stream>>::Output: Send + 'static,
<T as InboundUpgrade<Stream>>::Error: Send + 'static,
<T as InboundUpgrade<Stream>>::Future: Send + 'static,
impl<T, TInfo> InboundUpgradeSend for Twhere T: InboundUpgrade<Stream, Info = TInfo> + UpgradeInfoSend<Info = TInfo>, TInfo: AsRef<str> + Clone + Send + 'static, <T as InboundUpgrade<Stream>>::Output: Send + 'static, <T as InboundUpgrade<Stream>>::Error: Send + 'static, <T as InboundUpgrade<Stream>>::Future: Send + 'static,
§type Output = <T as InboundUpgrade<Stream>>::Output
type Output = <T as InboundUpgrade<Stream>>::Output
Equivalent to
InboundUpgrade::Output
.§type Error = <T as InboundUpgrade<Stream>>::Error
type Error = <T as InboundUpgrade<Stream>>::Error
Equivalent to
InboundUpgrade::Error
.§type Future = <T as InboundUpgrade<Stream>>::Future
type Future = <T as InboundUpgrade<Stream>>::Future
Equivalent to
InboundUpgrade::Future
.source§fn upgrade_inbound(
self,
socket: Stream,
info: TInfo
) -> <T as InboundUpgradeSend>::Future
fn upgrade_inbound( self, socket: Stream, 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
.