Struct medallion::Header
[−]
[src]
pub struct Header<T: Serialize + Deserialize> { pub alg: Algorithm, pub headers: Option<T>, }
A 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
alg: Algorithm
headers: Option<T>
Methods
impl<T: Serialize + Deserialize> Header<T>
[src]
fn from_base64(raw: &str) -> Result<Header<T>>
fn to_base64(&self) -> Result<String>
Encode to a string.
Trait Implementations
impl<T: Debug + Serialize + Deserialize> Debug for Header<T>
[src]
impl<T: PartialEq + Serialize + Deserialize> PartialEq for Header<T>
[src]
fn eq(&self, __arg_0: &Header<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Header<T>) -> bool
This method tests for !=
.