Struct medallion::Header[][src]

pub struct Header<T = ()> {
    pub alg: Algorithm,
    pub headers: Option<T>,
}

An extensible Header that provides only algorithm field and allows for additional fields to be passed in via a struct that can be serialized and deserialized. Unlike the Claims struct, there is no convenience type alias because headers seem to vary much more greatly in practice depending on the application whereas claims seem to be shared as a function of registerest and public claims.

Fields

Methods

impl<T: Serialize + DeserializeOwned> Header<T>
[src]

Decode from base64.

Encode to a string.

Trait Implementations

impl<T: Debug> Debug for Header<T>
[src]

Formats the value using the given formatter. Read more

impl<T: PartialEq> PartialEq for Header<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T> Default for Header<T>
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl<T> Send for Header<T> where
    T: Send

impl<T> Sync for Header<T> where
    T: Sync