[−][src]Struct noise_protocol::patterns::HandshakePattern
Noise handshake pattern.
Methods
impl HandshakePattern
[src]
pub fn new(
pre_i: &[Token],
pre_r: &[Token],
msg_patterns: &[&[Token]],
name: &'static str
) -> Self
[src]
pre_i: &[Token],
pre_r: &[Token],
msg_patterns: &[&[Token]],
name: &'static str
) -> Self
Construct a new HandshakePattern from pre-message patterns, message patterns and name.
Pattern validity
It is the caller's responlity to ensure that the pattern is valid.
Panics
If any of the patterns are too long (longer than 8 tokens).
Or if the number of patterns are too large (larger than 8).
pub fn get_pre_i(&self) -> &[Token]
[src]
Get initiator pre-messages.
pub fn get_pre_r(&self) -> &[Token]
[src]
Get responder pre-messages.
pub fn get_message_pattern(&self, i: usize) -> &[Token]
[src]
Get message patterns.
pub fn get_message_patterns_len(&self) -> usize
[src]
Get number of message patterns.
pub fn get_name(&self) -> &'static str
[src]
Get pattern name.
pub fn has_psk(&self) -> bool
[src]
Whether there are any psk tokens in this pattern.
pub fn is_one_way(&self) -> bool
[src]
Whether the pattern is a one-way pattern.
Trait Implementations
impl Clone for HandshakePattern
[src]
fn clone(&self) -> HandshakePattern
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,