pub struct PlainText1Config;Expand description
PlainText1Config is an insecure connection handshake for testing purposes only.
Note: Given that
PlainText1Confighas no notion of exchanging peer identity information it is not compatible with thelibp2p_core::transport::upgrade::Builderpattern. SeePlainText2Configif compatibility is needed. Even though not compatible with the Builder pattern one can still do an upgrade manually:
MemoryTransport::default()
.and_then(move |io, endpoint| {
tetsy_libp2p_core::upgrade::apply(
io,
PlainText1Config{},
endpoint,
tetsy_libp2p_core::transport::upgrade::Version::V1,
)
})
.map(|plaintext, _endpoint| {
unimplemented!();
// let peer_id = somehow_derive_peer_id();
// return (peer_id, plaintext);
});Trait Implementations§
Source§impl Clone for PlainText1Config
impl Clone for PlainText1Config
Source§fn clone(&self) -> PlainText1Config
fn clone(&self) -> PlainText1Config
Returns a duplicate 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 PlainText1Config
impl Debug for PlainText1Config
Source§impl<C> InboundUpgrade<C> for PlainText1Config
impl<C> InboundUpgrade<C> for PlainText1Config
Source§impl<C> OutboundUpgrade<C> for PlainText1Config
impl<C> OutboundUpgrade<C> for PlainText1Config
Source§impl UpgradeInfo for PlainText1Config
impl UpgradeInfo for PlainText1Config
Source§type InfoIter = Once<<PlainText1Config as UpgradeInfo>::Info>
type InfoIter = Once<<PlainText1Config 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.
impl Copy for PlainText1Config
Auto Trait Implementations§
impl Freeze for PlainText1Config
impl RefUnwindSafe for PlainText1Config
impl Send for PlainText1Config
impl Sync for PlainText1Config
impl Unpin for PlainText1Config
impl UnwindSafe for PlainText1Config
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
fn map_inbound<F, T>(self, f: F) -> MapInboundUpgrade<Self, F>
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>
fn map_inbound_err<F, T>(self, f: F) -> MapInboundUpgradeErr<Self, F>
Returns a new object that wraps around
Self and applies a closure to the Error.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<C, U> OutboundUpgradeExt<C> for Uwhere
U: OutboundUpgrade<C>,
impl<C, U> OutboundUpgradeExt<C> for Uwhere
U: OutboundUpgrade<C>,
Source§fn map_outbound<F, T>(self, f: F) -> MapOutboundUpgrade<Self, F>
fn map_outbound<F, T>(self, f: F) -> MapOutboundUpgrade<Self, F>
Returns a new object that wraps around
Self and applies a closure to the Output.Source§fn map_outbound_err<F, T>(self, f: F) -> MapOutboundUpgradeErr<Self, F>
fn map_outbound_err<F, T>(self, f: F) -> MapOutboundUpgradeErr<Self, F>
Returns a new object that wraps around
Self and applies a closure to the Error.