[][src]Struct disco::SessionBuilder

pub struct SessionBuilder<'a> { /* fields omitted */ }

Session builder.

Methods

impl<'a> SessionBuilder<'a>[src]

pub fn new(pattern: &str) -> Self[src]

Creates a new config builder for a given handshake pattern and role.

pub fn secret<T: Into<SecretKey<'a>>>(self, secret: T) -> Self[src]

Static secret for the peer.

pub fn remote_public<T: Into<PublicKey>>(self, public: T) -> Self[src]

The remote peer's static public key.

pub fn prologue(self, prologue: Vec<u8>) -> Self[src]

Any unencrypted messages that the client and the server exchanged in this session prior to the handshake.

pub fn add_psk(self, secret: [u8; 32]) -> Self[src]

A pre-shared key for handshake patterns including a psk token.

pub fn build_initiator(self) -> HandshakeState<'a>[src]

Build an initiator session.

pub fn build_responder(self) -> HandshakeState<'a>[src]

Build a responder session.

Trait Implementations

impl<'a> Clone for SessionBuilder<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for SessionBuilder<'a>

impl<'a> Send for SessionBuilder<'a>

impl<'a> Sync for SessionBuilder<'a>

impl<'a> Unpin for SessionBuilder<'a>

impl<'a> UnwindSafe for SessionBuilder<'a>

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, 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>,