#[non_exhaustive]pub struct Claims<ExtraClaims> {
pub exp: Option<u64>,
pub nbf: Option<u64>,
pub iat: Option<u64>,
pub iss: Option<String>,
pub sub: Option<String>,
pub aud: OneOrMany<String>,
pub jti: Option<String>,
pub extra: ExtraClaims,
}
Expand description
JWT Claims.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.exp: Option<u64>
nbf: Option<u64>
iat: Option<u64>
iss: Option<String>
sub: Option<String>
aud: OneOrMany<String>
jti: Option<String>
extra: ExtraClaims
Trait Implementations
sourceimpl<'de, ExtraClaims> Deserialize<'de> for Claims<ExtraClaims> where
ExtraClaims: Deserialize<'de>,
impl<'de, ExtraClaims> Deserialize<'de> for Claims<ExtraClaims> where
ExtraClaims: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl<ExtraClaims> RefUnwindSafe for Claims<ExtraClaims> where
ExtraClaims: RefUnwindSafe,
impl<ExtraClaims> Send for Claims<ExtraClaims> where
ExtraClaims: Send,
impl<ExtraClaims> Sync for Claims<ExtraClaims> where
ExtraClaims: Sync,
impl<ExtraClaims> Unpin for Claims<ExtraClaims> where
ExtraClaims: Unpin,
impl<ExtraClaims> UnwindSafe for Claims<ExtraClaims> where
ExtraClaims: UnwindSafe,
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more