Struct snow::params::NoiseParams
source · pub struct NoiseParams {
pub name: String,
pub base: BaseChoice,
pub handshake: HandshakeChoice,
pub dh: DHChoice,
pub cipher: CipherChoice,
pub hash: HashChoice,
}
Expand description
The set of choices (as specified in the Noise spec) that constitute a full protocol definition.
See: Chapter 11: Protocol Names.
§Examples
From a string definition:
let params: NoiseParams = "Noise_XX_25519_AESGCM_SHA256".parse().unwrap();
Fields§
§name: String
§base: BaseChoice
§handshake: HandshakeChoice
§dh: DHChoice
§cipher: CipherChoice
§hash: HashChoice
Implementations§
source§impl NoiseParams
impl NoiseParams
sourcepub fn new(
name: String,
base: BaseChoice,
handshake: HandshakeChoice,
dh: DHChoice,
cipher: CipherChoice,
hash: HashChoice,
) -> Self
pub fn new( name: String, base: BaseChoice, handshake: HandshakeChoice, dh: DHChoice, cipher: CipherChoice, hash: HashChoice, ) -> Self
Construct a new NoiseParams via specifying enums directly.
Trait Implementations§
source§impl Clone for NoiseParams
impl Clone for NoiseParams
source§fn clone(&self) -> NoiseParams
fn clone(&self) -> NoiseParams
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 NoiseParams
impl Debug for NoiseParams
source§impl FromStr for NoiseParams
impl FromStr for NoiseParams
source§impl PartialEq for NoiseParams
impl PartialEq for NoiseParams
source§fn eq(&self, other: &NoiseParams) -> bool
fn eq(&self, other: &NoiseParams) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for NoiseParams
Auto Trait Implementations§
impl Freeze for NoiseParams
impl RefUnwindSafe for NoiseParams
impl Send for NoiseParams
impl Sync for NoiseParams
impl Unpin for NoiseParams
impl UnwindSafe for NoiseParams
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)