pub struct Config { /* private fields */ }
Expand description
The configuration for the noise handshake.
Implementations§
Source§impl Config
impl Config
Sourcepub fn new(identity: &Keypair) -> Result<Self, Error>
pub fn new(identity: &Keypair) -> Result<Self, Error>
Construct a new configuration for the noise handshake using the XX handshake pattern.
Sourcepub fn with_prologue(self, prologue: Vec<u8>) -> Self
pub fn with_prologue(self, prologue: Vec<u8>) -> Self
Set the noise prologue.
Sourcepub fn with_webtransport_certhashes(
self,
certhashes: HashSet<Multihash<64>>,
) -> Self
pub fn with_webtransport_certhashes( self, certhashes: HashSet<Multihash<64>>, ) -> Self
Set WebTransport certhashes extension.
In case of initiator, these certhashes will be used to validate the ones reported by responder.
In case of responder, these certhashes will be reported to initiator.
Trait Implementations§
Source§impl<T> InboundConnectionUpgrade<T> for Config
impl<T> InboundConnectionUpgrade<T> for Config
Source§type Output = (PeerId, Output<T>)
type Output = (PeerId, Output<T>)
Output after the upgrade has been successfully negotiated and the handshake performed.
Source§impl<T> OutboundConnectionUpgrade<T> for Config
impl<T> OutboundConnectionUpgrade<T> for Config
Source§type Output = (PeerId, Output<T>)
type Output = (PeerId, Output<T>)
Output after the upgrade has been successfully negotiated and the handshake performed.
Source§impl UpgradeInfo for Config
impl UpgradeInfo for Config
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 Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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<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> 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 more