pub struct KeyHandle { /* private fields */ }Expand description
Opaque, redacted reference to a key stored inside a
KeyVault.
A KeyHandle is cheap to clone (it is Copy-shaped — currently Clone + Copy) and safe to pass across threads. It exposes no methods that return
raw key bytes; all operations that need the underlying material are performed
by the vault on the caller’s behalf.
§Examples
use key_vault::KeyHandle;
// Handles are only constructed by the vault. In tests you can construct one
// via the unit-tested helper. The important property is opacity:
let rendered = format!("{h:?}");
assert!(rendered.contains("redacted"));Trait Implementations§
impl Copy for KeyHandle
impl Eq for KeyHandle
impl StructuralPartialEq for KeyHandle
Auto Trait Implementations§
impl Freeze for KeyHandle
impl RefUnwindSafe for KeyHandle
impl Send for KeyHandle
impl Sync for KeyHandle
impl Unpin for KeyHandle
impl UnsafeUnpin for KeyHandle
impl UnwindSafe for KeyHandle
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