Enum snow::params::HandshakePattern
source · pub enum HandshakePattern {
Show 38 variants
N,
X,
K,
NN,
NK,
NX,
XN,
XK,
XX,
KN,
KK,
KX,
IN,
IK,
IX,
NK1,
NX1,
X1N,
X1K,
XK1,
X1K1,
X1X,
XX1,
X1X1,
K1N,
K1K,
KK1,
K1K1,
K1X,
KX1,
K1X1,
I1N,
I1K,
IK1,
I1K1,
I1X,
IX1,
I1X1,
}
Expand description
One of the patterns as defined in the Handshake Pattern section.
Variants§
N
X
K
NN
NK
NX
XN
XK
XX
KN
KK
KX
IN
IK
IX
NK1
NX1
X1N
X1K
XK1
X1K1
X1X
XX1
X1X1
K1N
K1K
KK1
K1K1
K1X
KX1
K1X1
I1N
I1K
IK1
I1K1
I1X
IX1
I1X1
Implementations§
source§impl HandshakePattern
impl HandshakePattern
sourcepub fn is_oneway(self) -> bool
pub fn is_oneway(self) -> bool
If the protocol is one-way only
See: http://noiseprotocol.org/noise.html#one-way-patterns
sourcepub fn needs_local_static_key(self, initiator: bool) -> bool
pub fn needs_local_static_key(self, initiator: bool) -> bool
Whether this pattern requires a long-term static key.
sourcepub fn need_known_remote_pubkey(self, initiator: bool) -> bool
pub fn need_known_remote_pubkey(self, initiator: bool) -> bool
Whether this pattern demands a remote public key pre-message.
Trait Implementations§
source§impl Clone for HandshakePattern
impl Clone for HandshakePattern
source§fn clone(&self) -> HandshakePattern
fn clone(&self) -> HandshakePattern
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 HandshakePattern
impl Debug for HandshakePattern
source§impl FromStr for HandshakePattern
impl FromStr for HandshakePattern
source§impl PartialEq<HandshakePattern> for HandshakePattern
impl PartialEq<HandshakePattern> for HandshakePattern
source§fn eq(&self, other: &HandshakePattern) -> bool
fn eq(&self, other: &HandshakePattern) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for HandshakePattern
impl StructuralPartialEq for HandshakePattern
Auto Trait Implementations§
impl RefUnwindSafe for HandshakePattern
impl Send for HandshakePattern
impl Sync for HandshakePattern
impl Unpin for HandshakePattern
impl UnwindSafe for HandshakePattern
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