[][src]Struct wascap::jwt::ClaimsBuilder

pub struct ClaimsBuilder { /* fields omitted */ }

Utility struct for creating a fluent builder for a new set of claims

Methods

impl ClaimsBuilder[src]

pub fn new() -> Self[src]

Creates a new builder

pub fn issuer(&mut self, issuer: &str) -> &mut Self[src]

Sets the issuer for the claims

pub fn subject(&mut self, module: &str) -> &mut Self[src]

Sets the subject for the claims

pub fn with_capability(&mut self, cap: &str) -> &mut Self[src]

Adds a capability to the claims

pub fn with_tag(&mut self, tag: &str) -> &mut Self[src]

Adds a tag to the claims

pub fn expires_in(&mut self, d: Duration) -> &mut Self[src]

Indicates how long this claim set will remain valid

pub fn valid_in(&mut self, d: Duration) -> &mut Self[src]

Indicates how long until this claim set becomes valid

pub fn provider(&mut self) -> &mut Self[src]

pub fn build(&self) -> Claims[src]

Produce a claims set from the builder

Trait Implementations

impl Default for ClaimsBuilder[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

type Error = !

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.

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> InitializableFromZeroed for T where
    T: Default