[][src]Struct aliri_jose::jwt::Headers

pub struct Headers<H = Empty> { /* fields omitted */ }

Common headers used on JWTs

Implementations

impl Headers[src]

pub const fn new(alg: Algorithm) -> Self[src]

Constructs JWT headers, to be signed by the specified algorithm

impl<H> Headers<H>[src]

pub fn with_key_id(self, kid: impl Into<KeyId>) -> Self[src]

Adds a key ID to the JWT header

pub fn with_headers<G>(self, headers: G) -> Headers<G>[src]

Adds custom headers to the JWT

pub fn headers(&self) -> &H[src]

A view of the custom headers

pub fn take_headers(self) -> H[src]

Moves the custom headers out

Trait Implementations

impl<H: Clone> Clone for Headers<H>[src]

impl<H> CoreHeaders for Headers<H>[src]

impl<H: Debug> Debug for Headers<H>[src]

impl<'de, H> Deserialize<'de> for Headers<H> where
    H: Deserialize<'de>, 
[src]

impl<H: Eq> Eq for Headers<H>[src]

impl<H> HasAlgorithm for Headers<H>[src]

impl<H: PartialEq> PartialEq<Headers<H>> for Headers<H>[src]

impl<H> Serialize for Headers<H> where
    H: Serialize
[src]

impl<H> StructuralEq for Headers<H>[src]

impl<H> StructuralPartialEq for Headers<H>[src]

Auto Trait Implementations

impl<H> RefUnwindSafe for Headers<H> where
    H: RefUnwindSafe

impl<H> Send for Headers<H> where
    H: Send

impl<H> Sync for Headers<H> where
    H: Sync

impl<H> Unpin for Headers<H> where
    H: Unpin

impl<H> UnwindSafe for Headers<H> where
    H: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.