Struct jwt::header::Header [] [src]

pub struct Header {
    pub typ: HeaderType,
    pub alg: Option<Algorithm>,
}

Fields

typ: HeaderType alg: Option<Algorithm>

Methods

impl Header
[src]

fn parse(raw: &str) -> Result<HeaderError>

Parse a header from a string.

fn encode(&self) -> Result<StringError>

Encode a header to a string.

Trait Implementations

impl Encodable for Header
[src]

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl Decodable for Header
[src]

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Header, __D::Error>

impl PartialEq for Header
[src]

fn eq(&self, __arg_0: &Header) -> bool

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

fn ne(&self, __arg_0: &Header) -> bool

This method tests for !=.

impl Debug for Header
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Default for Header
[src]

fn default() -> Header

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