pub struct FilteredUser {
pub id: i16,
pub first_name: String,
pub last_name: String,
pub username: String,
pub is_admin: bool,
}Expand description
Represents a user entity with sensitive information filtered out.
This struct is used for displaying user information in contexts where the password hash or other sensitive details are not needed or should not be exposed. It’s typically used for listing users or displaying user profiles.
§Fields
id: The unique identifier of the user.first_name: The first name of the user.last_name: The last name of the user.username: The unique username of the user.is_admin: A boolean indicating if the user has administrator privileges.
Fields§
§id: i16§first_name: String§last_name: String§username: String§is_admin: boolTrait 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
Source§impl<'de> Deserialize<'de> for FilteredUser
impl<'de> Deserialize<'de> for FilteredUser
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 PartialEq for FilteredUser
impl PartialEq for FilteredUser
Source§impl Serialize for FilteredUser
impl Serialize for FilteredUser
impl StructuralPartialEq 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> FromQuery for Twhere
T: DeserializeOwned,
impl<T> FromQuery for Twhere
T: DeserializeOwned,
§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>
§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.