pub struct CurrentUser {
pub id: i32,
pub first_name: String,
pub last_name: String,
pub email: String,
pub group: Group,
pub context: String,
}
Expand description
The user information for the request
Fields§
§id: i32
A unique ID
first_name: String
The user’s first name
last_name: String
The user’s last name
email: String
The primary email address
group: Group
The permission group for the current context. Should not be used when the context is
admin
or manage
.
context: String
The current authentication context
Implementations§
Source§impl CurrentUser
impl CurrentUser
Trait Implementations§
Source§impl Debug for CurrentUser
impl Debug for CurrentUser
Source§impl<S> FromRequestParts<S> for CurrentUser
impl<S> FromRequestParts<S> for CurrentUser
Source§type Rejection = InvalidRequestUser
type Rejection = InvalidRequestUser
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.
Auto Trait Implementations§
impl Freeze for CurrentUser
impl RefUnwindSafe for CurrentUser
impl Send for CurrentUser
impl Sync for CurrentUser
impl Unpin for CurrentUser
impl UnwindSafe for CurrentUser
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, B, T> FromRequest<S, B, ViaParts> for T
impl<S, B, T> FromRequest<S, B, 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.