Skip to main content

KeyProvider

Trait KeyProvider 

Source
pub trait KeyProvider: Send + Sync {
    // Required method
    fn key(&self) -> ThingdResult<[u8; 32]>;
}
Available on crate feature persistent only.
Expand description

Supplies the key used to open an encrypted database.

Required Methods§

Source

fn key(&self) -> ThingdResult<[u8; 32]>

Resolve a 32-byte encryption key.

§Errors

Returns an error when the key cannot be resolved or is invalid.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§