Struct libp2p_quic::NoiseParams[][src]

pub struct NoiseParams {
    pub name: String,
    pub base: BaseChoice,
    pub handshake: HandshakeChoice,
    pub dh: DHChoice,
    pub cipher: CipherChoice,
    pub hash: HashChoice,
}

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: Stringbase: BaseChoicehandshake: HandshakeChoicedh: DHChoicecipher: CipherChoicehash: HashChoice

Implementations

impl NoiseParams[src]

pub fn new(
    name: String,
    base: BaseChoice,
    handshake: HandshakeChoice,
    dh: DHChoice,
    cipher: CipherChoice,
    hash: HashChoice
) -> NoiseParams
[src]

Construct a new NoiseParams via specifying enums directly.

Trait Implementations

impl Clone for NoiseParams[src]

impl Debug for NoiseParams[src]

impl FromStr for NoiseParams[src]

type Err = Error

The associated error which can be returned from parsing.

impl PartialEq<NoiseParams> for NoiseParams[src]

impl StructuralPartialEq for NoiseParams[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,