Struct coset::ProtectedHeader
source · pub struct ProtectedHeader {
pub original_data: Option<Vec<u8>>,
pub header: Header,
}
Expand description
Structure representing a protected COSE header map.
Fields§
§original_data: Option<Vec<u8>>
If this structure was created by parsing serialized data, this field
holds the entire contents of the original bstr
data.
header: Header
Parsed header information.
Implementations§
Trait Implementations§
source§impl AsCborValue for ProtectedHeader
impl AsCborValue for ProtectedHeader
source§impl CborSerializable for ProtectedHeader
impl CborSerializable for ProtectedHeader
source§fn from_slice(slice: &[u8]) -> Result<Self>
fn from_slice(slice: &[u8]) -> Result<Self>
Create an object instance from serialized CBOR data in a slice. This method will fail (with
CoseError::ExtraneousData
) if there is additional CBOR data after the object.source§impl Clone for ProtectedHeader
impl Clone for ProtectedHeader
source§fn clone(&self) -> ProtectedHeader
fn clone(&self) -> ProtectedHeader
Returns a copy of the value. Read more
1.0.0 · 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 ProtectedHeader
impl Debug for ProtectedHeader
source§impl Default for ProtectedHeader
impl Default for ProtectedHeader
source§fn default() -> ProtectedHeader
fn default() -> ProtectedHeader
Returns the “default value” for a type. Read more
source§impl PartialEq for ProtectedHeader
impl PartialEq for ProtectedHeader
source§fn eq(&self, other: &ProtectedHeader) -> bool
fn eq(&self, other: &ProtectedHeader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ProtectedHeader
Auto Trait Implementations§
impl Freeze for ProtectedHeader
impl RefUnwindSafe for ProtectedHeader
impl Send for ProtectedHeader
impl Sync for ProtectedHeader
impl Unpin for ProtectedHeader
impl UnwindSafe for ProtectedHeader
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