pub struct FilteredUser {
pub id: i16,
pub first_name: String,
pub last_name: String,
pub username: String,
pub is_admin: bool,
}Expand description
User information sent to clients, excluding password hashes.
This is the safe version of User data that gets returned in API responses.
It never includes the password hash or JWT claims. Always use this for responses
to prevent leaking sensitive data.
Fields§
§id: i16Unique user identifier
first_name: StringUser’s first name
last_name: StringUser’s last name
username: StringLogin username
is_admin: boolWhether user has admin privileges
Trait Implementations§
Source§impl Clone for FilteredUser
impl Clone for FilteredUser
Source§fn clone(&self) -> FilteredUser
fn clone(&self) -> FilteredUser
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 moreSource§impl Debug for FilteredUser
impl Debug for FilteredUser
Auto Trait Implementations§
impl Freeze for FilteredUser
impl RefUnwindSafe for FilteredUser
impl Send for FilteredUser
impl Sync for FilteredUser
impl Unpin for FilteredUser
impl UnwindSafe for FilteredUser
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more