pub struct WrappedKey { /* private fields */ }Expand description
A wrapped key, the scheme that produced it, and what that wrap did.
The three are constructed together and read together: a scheme that does not admit the description would label the bytes with something the bytes contradict.
Implementations§
Source§impl WrappedKey
impl WrappedKey
Sourcepub fn new(
scheme: WrapScheme,
description: WrapDescription,
data: Vec<u8>,
) -> Result<Self, IncoherentWrap>
pub fn new( scheme: WrapScheme, description: WrapDescription, data: Vec<u8>, ) -> Result<Self, IncoherentWrap>
Pair wrapped bytes with the scheme and the description of the wrap.
§Errors
Returns IncoherentWrap if the scheme does not admit the
description.
Sourcepub fn scheme(&self) -> WrapScheme
pub fn scheme(&self) -> WrapScheme
The scheme this key was wrapped under.
Sourcepub fn description(&self) -> &WrapDescription
pub fn description(&self) -> &WrapDescription
What the wrap did, read back from the artifact.
Trait Implementations§
Source§impl Clone for WrappedKey
impl Clone for WrappedKey
Source§fn clone(&self) -> WrappedKey
fn clone(&self) -> WrappedKey
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 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