#[non_exhaustive]pub enum ClaimsOptions {
V0(ClaimsOptions),
V1(ClaimsOptions),
}Expand description
A common struct to group related options together.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl ClaimsOptions
impl ClaimsOptions
Sourcepub const fn v0(
revision: Option<u32>,
version: Option<String>,
expires_in_days: Option<u64>,
not_before_days: Option<u64>,
) -> Self
pub const fn v0( revision: Option<u32>, version: Option<String>, expires_in_days: Option<u64>, not_before_days: Option<u64>, ) -> Self
Create a new v0 claims.
Sourcepub const fn v1(
version: Option<String>,
expires_in_days: Option<u64>,
not_before_days: Option<u64>,
) -> Self
pub const fn v1( version: Option<String>, expires_in_days: Option<u64>, not_before_days: Option<u64>, ) -> Self
Create a new v1 claims.
Sourcepub const fn expires_in_days(&self) -> Option<u64>
pub const fn expires_in_days(&self) -> Option<u64>
Get when the claims expire in days
Sourcepub const fn not_before_days(&self) -> Option<u64>
pub const fn not_before_days(&self) -> Option<u64>
Get when the claims are valid (in days)
Trait Implementations§
Source§impl Clone for ClaimsOptions
impl Clone for ClaimsOptions
Source§fn clone(&self) -> ClaimsOptions
fn clone(&self) -> ClaimsOptions
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ClaimsOptions
impl RefUnwindSafe for ClaimsOptions
impl Send for ClaimsOptions
impl Sync for ClaimsOptions
impl Unpin for ClaimsOptions
impl UnwindSafe for ClaimsOptions
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