pub struct RequestClaim<T>where
for<'de> T: Deserialize<'de>,{
pub claim: T,
pub token: String,
}Expand description
Used to hold the validated claim from the JWT token
Fields§
§claim: TThe claim from the token
token: StringThe original token that was parsed
Implementations§
Source§impl<T> RequestClaim<T>where
for<'de> T: Deserialize<'de>,
impl<T> RequestClaim<T>where
for<'de> T: Deserialize<'de>,
pub fn from_token( token: &str, decoding_key: &DecodingKey, validation: &Validation, ) -> Result<Self, StatusCode>
Trait Implementations§
Source§impl<T> Clone for RequestClaim<T>where
for<'de> T: Deserialize<'de> + Clone,
impl<T> Clone for RequestClaim<T>where
for<'de> T: Deserialize<'de> + Clone,
Source§fn clone(&self) -> RequestClaim<T>
fn clone(&self) -> RequestClaim<T>
Returns a duplicate 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<T> Freeze for RequestClaim<T>where
T: Freeze,
impl<T> RefUnwindSafe for RequestClaim<T>where
T: RefUnwindSafe,
impl<T> Send for RequestClaim<T>where
T: Send,
impl<T> Sync for RequestClaim<T>where
T: Sync,
impl<T> Unpin for RequestClaim<T>where
T: Unpin,
impl<T> UnwindSafe for RequestClaim<T>where
T: 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