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 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