pub struct Claims<T>(pub T);
Expand description
A generic struct for holding the claims of a JWT token.
Tuple Fields§
§0: T
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Claims<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Claims<T>where
T: 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
Source§impl<S, T> FromRequestParts<S> for Claims<T>
impl<S, T> FromRequestParts<S> for Claims<T>
Auto Trait Implementations§
impl<T> Freeze for Claims<T>where
T: Freeze,
impl<T> RefUnwindSafe for Claims<T>where
T: RefUnwindSafe,
impl<T> Send for Claims<T>where
T: Send,
impl<T> Sync for Claims<T>where
T: Sync,
impl<T> Unpin for Claims<T>where
T: Unpin,
impl<T> UnwindSafe for Claims<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
Source§impl<S, T> FromRequest<S, ViaParts> for T
impl<S, T> FromRequest<S, ViaParts> for T
Source§type Rejection = <T as FromRequestParts<S>>::Rejection
type Rejection = <T as FromRequestParts<S>>::Rejection
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.
Source§fn from_request(
req: Request<Body>,
state: &S,
) -> impl Future<Output = Result<T, <T as FromRequest<S, ViaParts>>::Rejection>>
fn from_request( req: Request<Body>, state: &S, ) -> impl Future<Output = Result<T, <T as FromRequest<S, ViaParts>>::Rejection>>
Perform the extraction.