Struct medallion::Header [−][src]
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
alg: Algorithm
headers: Option<T>
Methods
impl<T: Serialize + DeserializeOwned> Header<T>
[src]
impl<T: Serialize + DeserializeOwned> Header<T>
pub fn from_base64(raw: &str) -> Result<Header<T>>
[src]
pub fn from_base64(raw: &str) -> Result<Header<T>>
Decode from base64.
pub fn to_base64(&self) -> Result<String>
[src]
pub fn to_base64(&self) -> Result<String>
Encode to a string.
Trait Implementations
impl<T: Debug> Debug for Header<T>
[src]
impl<T: Debug> Debug for Header<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: PartialEq> PartialEq for Header<T>
[src]
impl<T: PartialEq> PartialEq for Header<T>
fn eq(&self, other: &Header<T>) -> bool
[src]
fn eq(&self, other: &Header<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Header<T>) -> bool
[src]
fn ne(&self, other: &Header<T>) -> bool
This method tests for !=
.
impl<T> Default for Header<T>
[src]
impl<T> Default for Header<T>