pub struct AuthContext {
pub user_id: Option<String>,
pub user_name: Option<String>,
pub roles: Option<Vec<String>>,
pub api_key: Option<Option<String>>,
}Expand description
AuthContext : Authentication context for the logged-in user.
Fields§
§user_id: Option<String>§user_name: Option<String>§roles: Option<Vec<String>>§api_key: Option<Option<String>>Implementations§
Source§impl AuthContext
impl AuthContext
Sourcepub fn new() -> AuthContext
pub fn new() -> AuthContext
Authentication context for the logged-in user.
Trait Implementations§
Source§impl Clone for AuthContext
impl Clone for AuthContext
Source§fn clone(&self) -> AuthContext
fn clone(&self) -> AuthContext
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 AuthContext
impl Debug for AuthContext
Source§impl Default for AuthContext
impl Default for AuthContext
Source§fn default() -> AuthContext
fn default() -> AuthContext
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AuthContext
impl<'de> Deserialize<'de> for AuthContext
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 AuthContext
impl PartialEq for AuthContext
Source§impl Serialize for AuthContext
impl Serialize for AuthContext
impl StructuralPartialEq for AuthContext
Auto Trait Implementations§
impl Freeze for AuthContext
impl RefUnwindSafe for AuthContext
impl Send for AuthContext
impl Sync for AuthContext
impl Unpin for AuthContext
impl UnwindSafe for AuthContext
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