pub struct User {Show 15 fields
pub id: String,
pub name: Option<String>,
pub email: Option<String>,
pub email_verified: bool,
pub image: Option<String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub username: Option<String>,
pub display_username: Option<String>,
pub two_factor_enabled: bool,
pub role: Option<String>,
pub banned: bool,
pub ban_reason: Option<String>,
pub ban_expires: Option<DateTime<Utc>>,
pub metadata: Value,
}Expand description
Core user type - matches OpenAPI schema
Fields§
§id: String§name: Option<String>§email: Option<String>§email_verified: bool§image: Option<String>§created_at: DateTime<Utc>§updated_at: DateTime<Utc>§username: Option<String>§display_username: Option<String>§two_factor_enabled: bool§role: Option<String>§banned: bool§ban_reason: Option<String>§ban_expires: Option<DateTime<Utc>>§metadata: ValueTrait Implementations§
Source§impl AuthUser for User
impl AuthUser for User
fn id(&self) -> &str
fn email(&self) -> Option<&str>
fn name(&self) -> Option<&str>
fn email_verified(&self) -> bool
fn image(&self) -> Option<&str>
fn created_at(&self) -> DateTime<Utc>
fn updated_at(&self) -> DateTime<Utc>
fn username(&self) -> Option<&str>
fn display_username(&self) -> Option<&str>
fn two_factor_enabled(&self) -> bool
fn role(&self) -> Option<&str>
fn banned(&self) -> bool
fn ban_reason(&self) -> Option<&str>
fn ban_expires(&self) -> Option<DateTime<Utc>>
fn metadata(&self) -> &Value
Source§impl<'de> Deserialize<'de> for User
impl<'de> Deserialize<'de> for User
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<User, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<User, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl MemoryUser for User
impl MemoryUser for User
Source§fn from_create(id: String, create: &CreateUser, now: DateTime<Utc>) -> User
fn from_create(id: String, create: &CreateUser, now: DateTime<Utc>) -> User
Construct a new user from creation data.
Source§fn apply_update(&mut self, update: &UpdateUser)
fn apply_update(&mut self, update: &UpdateUser)
Apply an update in place.
Source§impl Serialize for User
impl Serialize for User
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for User
Auto Trait Implementations§
impl Freeze for User
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnwindSafe for User
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