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
sourceimpl 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
sourceimpl Clone for NoiseParams
impl Clone for NoiseParams
sourcefn clone(&self) -> NoiseParams
fn clone(&self) -> NoiseParams
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 NoiseParams
impl Debug for NoiseParams
sourceimpl FromStr for NoiseParams
impl FromStr for NoiseParams
sourceimpl PartialEq<NoiseParams> for NoiseParams
impl PartialEq<NoiseParams> for NoiseParams
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &NoiseParams) -> bool
fn ne(&self, other: &NoiseParams) -> bool
This method tests for !=
.
impl StructuralPartialEq for NoiseParams
Auto Trait Implementations
impl RefUnwindSafe for NoiseParams
impl Send for NoiseParams
impl Sync for NoiseParams
impl Unpin for NoiseParams
impl UnwindSafe for NoiseParams
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