[][src]Struct kuska_handshake::BoxStreamSend

pub struct BoxStreamSend { /* fields omitted */ }

The transport agnostic boxstream sending side.

Implementations

impl BoxStreamSend[src]

pub fn new(key_nonce: KeyNonce) -> Self[src]

Create a new BoxStreamSend from the key_nonce.

pub fn encrypt(
    &mut self,
    buf: &[u8],
    enc: &mut [u8]
) -> Result<(usize, usize), Error>
[src]

Encrypt a single boxstream message by taking bytes from buf and encrypting them into enc. Returns the number of bytes read from buf and the number of bytes written into enc.

pub fn encrypt_goodbye(&mut self, enc: &mut [u8]) -> Result<usize, Error>[src]

Encrypt a goodbye message into enc. Returns the number of bytes written into enc.

pub fn goodbye_sent(&self) -> bool[src]

Returns whether the goodbye message has been sent or not.

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, U> Into<U> for T where
    U: From<T>, 
[src]

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.