Struct libjwt::Header
[−]
[src]
pub struct Header<'h>(_);
Jwt's header
Methods
impl<'h> Header<'h>
[src]
pub fn new<S>(raw: S) -> Self where
S: Into<Cow<'h, str>>,
[src]
S: Into<Cow<'h, str>>,
Create a Jwt's header from any type who can be turned into a Cow<'h, str>
pub fn convert<T>(base: T) -> Result<Self> where
T: AsBase64,
[src]
T: AsBase64,
Convert a base64 transformable into a header.
pub fn as_algorithm(&self) -> Result<Algorithm>
[src]
In JWT's header you can have the field "alg" who provide which algorithm is used to sign your token. We get this field and convert it into an algorithm.
Trait Implementations
impl<'h> Debug for Header<'h>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'h> Clone for Header<'h>
[src]
fn clone(&self) -> Header<'h>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'h> FromBase64 for Header<'h>
[src]
fn from_base64(&self) -> Result<Vec<u8>>
[src]
Convert it!