[][src]Struct cpace::Context

pub struct Context<'ctx> {
    pub initiator_id: &'ctx str,
    pub responder_id: &'ctx str,
    pub associated_data: &'ctx [u8],
}

Contextual data bound to the resulting Key.

Both peers need to construct identical contexts to agree on a key.

The Context struct is intended to be constructed inline to the call to init or respond, simulating named parameters.

Fields

initiator_id: &'ctx str

A representation of the identity of the initiator.

responder_id: &'ctx str

A representation of the identity of the responder.

associated_data: &'ctx [u8]

Optional associated data the key will be bound to (can be empty).

Trait Implementations

impl<'ctx> Clone for Context<'ctx>[src]

impl<'ctx> Copy for Context<'ctx>[src]

Auto Trait Implementations

impl<'ctx> RefUnwindSafe for Context<'ctx>

impl<'ctx> Send for Context<'ctx>

impl<'ctx> Sync for Context<'ctx>

impl<'ctx> Unpin for Context<'ctx>

impl<'ctx> UnwindSafe for Context<'ctx>

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.