pub struct StaticKeyProvider { /* private fields */ }Expand description
A key provider holding an active key and zero or more previous keys, in memory. Suitable for production when constructed from real secret material loaded at startup, and for tests/examples.
There is deliberately no Default or empty constructor that would yield a
usable-but-keyless provider: you must supply real bytes (INV-2).
Implementations§
Source§impl StaticKeyProvider
impl StaticKeyProvider
Trait Implementations§
Source§impl Clone for StaticKeyProvider
impl Clone for StaticKeyProvider
Source§fn clone(&self) -> StaticKeyProvider
fn clone(&self) -> StaticKeyProvider
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 StaticKeyProvider
impl Debug for StaticKeyProvider
Source§impl KeyProvider for StaticKeyProvider
impl KeyProvider for StaticKeyProvider
Source§fn active_hmac_key(&self) -> Result<HmacKeyRef<'_>, KeyError>
fn active_hmac_key(&self) -> Result<HmacKeyRef<'_>, KeyError>
The active key used for new derivations. Read more
Source§fn hmac_key_by_version(
&self,
version: &KeyVersion,
) -> Result<HmacKeyRef<'_>, KeyError>
fn hmac_key_by_version( &self, version: &KeyVersion, ) -> Result<HmacKeyRef<'_>, KeyError>
A specific historical key, for validating records written under an older
version during rotation. Read more
Auto Trait Implementations§
impl Freeze for StaticKeyProvider
impl RefUnwindSafe for StaticKeyProvider
impl Send for StaticKeyProvider
impl Sync for StaticKeyProvider
impl Unpin for StaticKeyProvider
impl UnsafeUnpin for StaticKeyProvider
impl UnwindSafe for StaticKeyProvider
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