#[non_exhaustive]
pub enum HeaderParameter {
Show 16 variants Reserved = 0, Alg = 1, Crit = 2, ContentType = 3, Kid = 4, Iv = 5, PartialIv = 6, CounterSignature = 7, CounterSignature0 = 9, KidContext = 10, X5Bag = 32, X5Chain = 33, X5T = 34, X5U = 35, CuphNonce = 256, CuphOwnerPubKey = 257,
}
Expand description

IANA-registered COSE header parameters.

From IANA registry https://www.iana.org/assignments/cose/cose.xhtml#header-parameters as of 2021-03-19.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Reserved = 0

Reserved

§

Alg = 1

Cryptographic algorithm to use

Associated value of type int / tstr

§

Crit = 2

Critical headers to be understood

Associated value of type [+ label]

§

ContentType = 3

Content type of the payload

Associated value of type tstr / uint

§

Kid = 4

Key identifier

Associated value of type bstr

§

Iv = 5

Full Initialization Vector

Associated value of type bstr

§

PartialIv = 6

Partial Initialization Vector

Associated value of type bstr

§

CounterSignature = 7

CBOR-encoded signature structure

Associated value of type COSE_Signature / [+ COSE_Signature ]

§

CounterSignature0 = 9

Counter signature with implied signer and headers

Associated value of type bstr

§

KidContext = 10

Identifies the context for the key identifier

Associated value of type bstr

§

X5Bag = 32

An unordered bag of X.509 certificates

Associated value of type COSE_X509

§

X5Chain = 33

An ordered chain of X.509 certificates

Associated value of type COSE_X509

§

X5T = 34

Hash of an X.509 certificate

Associated value of type COSE_CertHash

§

X5U = 35

URI pointing to an X.509 certificate

Associated value of type uri

§

CuphNonce = 256

Challenge Nonce

Associated value of type bstr

§

CuphOwnerPubKey = 257

Public Key

Associated value of type array

Trait Implementations§

source§

impl Clone for HeaderParameter

source§

fn clone(&self) -> HeaderParameter

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for HeaderParameter

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl EnumI64 for HeaderParameter

source§

fn from_i64(i: i64) -> Option<Self>

source§

fn to_i64(&self) -> i64

source§

impl Ord for HeaderParameter

source§

fn cmp(&self, other: &HeaderParameter) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for HeaderParameter

source§

fn eq(&self, other: &HeaderParameter) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for HeaderParameter

source§

fn partial_cmp(&self, other: &HeaderParameter) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl WithPrivateRange for HeaderParameter

source§

impl Copy for HeaderParameter

source§

impl Eq for HeaderParameter

source§

impl StructuralPartialEq for HeaderParameter

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.