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
sourceimpl 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
sourceimpl Clone for HandshakePattern
impl Clone for HandshakePattern
sourcefn clone(&self) -> HandshakePattern
fn clone(&self) -> HandshakePattern
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for HandshakePattern
impl Debug for HandshakePattern
sourceimpl FromStr for HandshakePattern
impl FromStr for HandshakePattern
sourceimpl PartialEq<HandshakePattern> for HandshakePattern
impl PartialEq<HandshakePattern> for HandshakePattern
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more