[][src]Struct libsignal_protocol::Context

pub struct Context(_);

Global state and callbacks used by the library.

Most functions which require access to the global context (e.g. for crypto functions or locking) will accept a &Context as their first argument.

Methods

impl Context[src]

pub fn new<C: Crypto + 'static>(crypto: C) -> Result<Context, Error>[src]

Create a new Context using the provided cryptographic functions.

pub fn crypto(&self) -> &dyn Crypto[src]

Access the original Crypto object.

pub fn set_log_func<F>(&self, log_func: F) where
    F: Fn(Level, &str) + RefUnwindSafe + 'static, 
[src]

Se the function to use when libsignal-protocol-c emits a log message.

Trait Implementations

impl Clone for Context[src]

impl Debug for Context[src]

impl Default for Context[src]

Auto Trait Implementations

impl !RefUnwindSafe for Context

impl !Send for Context

impl !Sync for Context

impl Unpin for Context

impl UnwindSafe for Context

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[src]

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.