Struct jwt_simple::claims::Claims
source · [−]pub struct Claims;Implementations
sourceimpl Claims
impl Claims
sourcepub fn create(valid_for: Duration) -> JWTClaims<NoCustomClaims>
pub fn create(valid_for: Duration) -> JWTClaims<NoCustomClaims>
Create a new set of claims, without custom data, expiring in valid_for.
sourcepub fn with_custom_claims<CustomClaims: Serialize + DeserializeOwned>(
custom_claims: CustomClaims,
valid_for: Duration
) -> JWTClaims<CustomClaims>
pub fn with_custom_claims<CustomClaims: Serialize + DeserializeOwned>(
custom_claims: CustomClaims,
valid_for: Duration
) -> JWTClaims<CustomClaims>
Create a new set of claims, with custom data, expiring in valid_for.
Auto Trait Implementations
impl RefUnwindSafe for Claims
impl Send for Claims
impl Sync for Claims
impl Unpin for Claims
impl UnwindSafe for Claims
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more