pub struct WrappedKey(/* private fields */);Expand description
A key wrapped for transport.
Carries a custody claim: this key left a backend under protection. That is
what separates it from EncryptedData, which holds the same shape of
bytes and claims nothing about custody.
Implementations§
Source§impl WrappedKey
impl WrappedKey
Sourcepub fn new(
scheme: WrapScheme,
description: WrapDescription,
data: Vec<u8>,
) -> Result<Self, IncoherentContainer>
pub fn new( scheme: WrapScheme, description: WrapDescription, data: Vec<u8>, ) -> Result<Self, IncoherentContainer>
Pair a wrapped key with the scheme and the description of what was done.
§Errors
Returns IncoherentContainer if the scheme does not admit the
description.
Sourcepub fn scheme(&self) -> WrapScheme
pub fn scheme(&self) -> WrapScheme
The scheme a wrapped key went into.
Sourcepub fn description(&self) -> &WrapDescription
pub fn description(&self) -> &WrapDescription
What the operation did, read back from the artifact.
Trait Implementations§
Source§impl Clone for WrappedKey
impl Clone for WrappedKey
Source§impl Debug for WrappedKey
impl Debug for WrappedKey
Source§impl<'de> Deserialize<'de> for WrappedKey
impl<'de> Deserialize<'de> for WrappedKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WrappedKey
impl RefUnwindSafe for WrappedKey
impl Send for WrappedKey
impl Sync for WrappedKey
impl Unpin for WrappedKey
impl UnsafeUnpin for WrappedKey
impl UnwindSafe for WrappedKey
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