pub struct CipherOptions {
pub keys: HashMap<String, Vec<u8>>,
pub key_id: Option<String>,
pub on_missing_key: Option<MissingKeyPolicy>,
}Expand description
Options for Database::open — key material and how reads behave when a value was written with
a key that is not among them. Mirrors the TS CipherOptions.
Fields§
§keys: HashMap<String, Vec<u8>>Every key that may be needed to read, by id. Each must be 32 bytes for AES-256-GCM.
key_id: Option<String>Which of them new values are written with. Defaults to the only key, when there is one.
on_missing_key: Option<MissingKeyPolicy>Trait Implementations§
Source§impl Clone for CipherOptions
impl Clone for CipherOptions
Source§fn clone(&self) -> CipherOptions
fn clone(&self) -> CipherOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CipherOptions
impl Debug for CipherOptions
Source§impl Default for CipherOptions
impl Default for CipherOptions
Source§fn default() -> CipherOptions
fn default() -> CipherOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CipherOptions
impl RefUnwindSafe for CipherOptions
impl Send for CipherOptions
impl Sync for CipherOptions
impl Unpin for CipherOptions
impl UnsafeUnpin for CipherOptions
impl UnwindSafe for CipherOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more