pub struct Claims;Implementations§
Source§impl 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 Freeze for Claims
impl RefUnwindSafe for Claims
impl Send for Claims
impl Sync for Claims
impl Unpin for Claims
impl UnsafeUnpin for Claims
impl UnwindSafe for Claims
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more