pub struct ActiveUser {
pub id: Option<i16>,
pub is_admin: bool,
}Expand description
Represents the essential information of the currently authenticated user.
This struct is used to hold a subset of user data relevant for client-side logic, such as determining if the user is an administrator or filtering tickets by their ID.
§Fields
id: AnOption<i16>holding the unique ID of the active user.Noneif not authenticated or ID is unavailable.is_admin: A boolean indicating if the active user has administrator privileges.
Fields§
§id: Option<i16>§is_admin: boolTrait Implementations§
Source§impl Clone for ActiveUser
impl Clone for ActiveUser
Source§fn clone(&self) -> ActiveUser
fn clone(&self) -> ActiveUser
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 ActiveUser
impl Debug for ActiveUser
Source§impl PartialEq for ActiveUser
impl PartialEq for ActiveUser
impl StructuralPartialEq for ActiveUser
Auto Trait Implementations§
impl Freeze for ActiveUser
impl RefUnwindSafe for ActiveUser
impl Send for ActiveUser
impl Sync for ActiveUser
impl Unpin for ActiveUser
impl UnwindSafe for ActiveUser
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>
§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.