Skip to main content

ContextOps

Trait ContextOps 

Source
pub trait ContextOps {
    // Required methods
    fn init(&mut self) -> Result<()>;
    fn is_initialized(&self) -> bool;
    fn provider(&self) -> Option<&dyn CryptoProvider>;
    fn set_provider(&mut self, provider: Box<dyn CryptoProvider>);
}
Expand description

Base context trait that all cryptographic contexts must implement

Required Methods§

Source

fn init(&mut self) -> Result<()>

Initialize the context

Source

fn is_initialized(&self) -> bool

Check if the context is initialized

Source

fn provider(&self) -> Option<&dyn CryptoProvider>

Get the provider (if any)

Source

fn set_provider(&mut self, provider: Box<dyn CryptoProvider>)

Set the provider

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§