Struct libp2p::plaintext::PlainText2Config [−][src]
pub struct PlainText2Config {
pub local_public_key: PublicKey,
}Expand description
PlainText2Config is an insecure connection handshake for testing purposes only, implementing
the libp2p plaintext connection handshake specification.
Fields
local_public_key: PublicKeyTrait Implementations
impl<C> InboundUpgrade<C> for PlainText2Config where
C: AsyncRead + AsyncWrite + Send + Unpin + 'static, [src]
impl<C> InboundUpgrade<C> for PlainText2Config where
C: AsyncRead + AsyncWrite + Send + Unpin + 'static, [src]type Output = (PeerId, PlainTextOutput<C>)
type Output = (PeerId, PlainTextOutput<C>)Output after the upgrade has been successfully negotiated and the handshake performed.
type Error = PlainTextError
type Error = PlainTextErrorPossible error during the handshake.
type Future = Pin<Box<dyn Future<Output = Result<<PlainText2Config as InboundUpgrade<C>>::Output, <PlainText2Config as InboundUpgrade<C>>::Error>> + 'static + Send, Global>>
type Future = Pin<Box<dyn Future<Output = Result<<PlainText2Config as InboundUpgrade<C>>::Output, <PlainText2Config as InboundUpgrade<C>>::Error>> + 'static + Send, Global>>Future that performs the handshake with the remote.
pub fn upgrade_inbound(
self,
socket: C,
<PlainText2Config as UpgradeInfo>::Info
) -> <PlainText2Config as InboundUpgrade<C>>::Future[src]
pub fn upgrade_inbound(
self,
socket: C,
<PlainText2Config as UpgradeInfo>::Info
) -> <PlainText2Config as InboundUpgrade<C>>::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
impl<C> OutboundUpgrade<C> for PlainText2Config where
C: AsyncRead + AsyncWrite + Send + Unpin + 'static, [src]
impl<C> OutboundUpgrade<C> for PlainText2Config where
C: AsyncRead + AsyncWrite + Send + Unpin + 'static, [src]type Output = (PeerId, PlainTextOutput<C>)
type Output = (PeerId, PlainTextOutput<C>)Output after the upgrade has been successfully negotiated and the handshake performed.
type Error = PlainTextError
type Error = PlainTextErrorPossible error during the handshake.
type Future = Pin<Box<dyn Future<Output = Result<<PlainText2Config as OutboundUpgrade<C>>::Output, <PlainText2Config as OutboundUpgrade<C>>::Error>> + 'static + Send, Global>>
type Future = Pin<Box<dyn Future<Output = Result<<PlainText2Config as OutboundUpgrade<C>>::Output, <PlainText2Config as OutboundUpgrade<C>>::Error>> + 'static + Send, Global>>Future that performs the handshake with the remote.
pub fn upgrade_outbound(
self,
socket: C,
<PlainText2Config as UpgradeInfo>::Info
) -> <PlainText2Config as OutboundUpgrade<C>>::Future[src]
pub fn upgrade_outbound(
self,
socket: C,
<PlainText2Config as UpgradeInfo>::Info
) -> <PlainText2Config as OutboundUpgrade<C>>::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<<PlainText2Config as UpgradeInfo>::Info>
type InfoIter = Once<<PlainText2Config 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 PlainText2Configimpl Send for PlainText2Configimpl Sync for PlainText2Configimpl Unpin for PlainText2Configimpl UnwindSafe for PlainText2ConfigBlanket 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.
fn map_outbound<F, T>(self, f: F) -> MapOutboundUpgrade<Self, F> where
F: FnOnce(Self::Output) -> T, [src]
fn map_outbound<F, T>(self, f: F) -> MapOutboundUpgrade<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_outbound_err<F, T>(self, f: F) -> MapOutboundUpgradeErr<Self, F> where
F: FnOnce(Self::Error) -> T, [src]
fn map_outbound_err<F, T>(self, f: F) -> MapOutboundUpgradeErr<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