pub struct User {Show 37 fields
pub id: Snowflake,
pub username: String,
pub discriminator: String,
pub avatar: Option<String>,
pub accent_color: Option<u8>,
pub banner: Option<String>,
pub theme_colors: Option<Vec<u8>>,
pub pronouns: Option<String>,
pub phone: Option<String>,
pub desktop: bool,
pub mobile: bool,
pub premium: bool,
pub premium_type: u8,
pub bot: bool,
pub bio: String,
pub system: bool,
pub nsfw_allowed: bool,
pub mfa_enabled: bool,
pub webauthn_enabled: bool,
pub totp_secret: Option<String>,
pub totp_last_ticket: Option<String>,
pub created_at: DateTime<Utc>,
pub premium_since: Option<DateTime<Utc>>,
pub verified: bool,
pub disabled: bool,
pub deleted: bool,
pub email: Option<String>,
pub flags: String,
pub public_flags: u16,
pub purchased_flags: u16,
pub premium_usage_flags: u16,
pub rights: String,
pub relationship_ids: Vec<String>,
pub connected_account_ids: Vec<String>,
pub data: UserData,
pub fingerprints: Vec<String>,
pub extended_settings: Value,
}Fields§
§id: Snowflake§username: String§discriminator: String§avatar: Option<String>§accent_color: Option<u8>§theme_colors: Option<Vec<u8>>§pronouns: Option<String>§phone: Option<String>§desktop: bool§mobile: bool§bot: bool§bio: String§system: bool§nsfw_allowed: bool§mfa_enabled: bool§webauthn_enabled: bool§totp_secret: Option<String>§totp_last_ticket: Option<String>§created_at: DateTime<Utc>§verified: bool§disabled: bool§deleted: bool§email: Option<String>§flags: String§public_flags: u16§purchased_flags: u16§rights: String§relationship_ids: Vec<String>§connected_account_ids: Vec<String>§data: UserData§fingerprints: Vec<String>§extended_settings: ValueImplementations§
Source§impl User
impl User
pub fn to_public_user(self) -> PublicUser
Trait Implementations§
Source§impl<'de> Deserialize<'de> for User
impl<'de> Deserialize<'de> for User
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 From<User> for PublicUser
impl From<User> for PublicUser
impl Eq for User
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