Struct jsonwebtoken::Header [] [src]

pub struct Header {
    pub alg: Algorithm,
    pub jku: Option<String>,
    pub kid: Option<String>,
    pub x5u: Option<String>,
    pub x5t: Option<String>,
    // some fields omitted
}

A basic JWT header part, the alg defaults to HS256 and typ is automatically set to JWT. All the other fields are optional

Fields

alg
jku
kid
x5u
x5t

Methods

impl Header
[src]

fn new(algorithm: Algorithm) -> Header

Trait Implementations

impl Default for Header
[src]

fn default() -> Header

impl Encodable for Header
[src]

fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>

impl ToJson for Header
[src]

fn to_json(&self) -> Json

Derived Implementations

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

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

impl Debug for Header
[src]

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