#[non_exhaustive]pub struct Claims<ExtraClaims> {
pub exp: Option<Duration>,
pub nbf: Option<Duration>,
pub iat: Option<Duration>,
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<Duration>
§nbf: Option<Duration>
§iat: Option<Duration>
§iss: Option<String>
§sub: Option<String>
§aud: OneOrMany<String>
§jti: Option<String>
§extra: ExtraClaims
Trait Implementations§
Source§impl<'de, ExtraClaims> Deserialize<'de> for Claims<ExtraClaims>where
ExtraClaims: Deserialize<'de>,
impl<'de, ExtraClaims> Deserialize<'de> for Claims<ExtraClaims>where
ExtraClaims: Deserialize<'de>,
Source§fn 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> Freeze for Claims<ExtraClaims>where
ExtraClaims: Freeze,
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§
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