pub struct User {
pub id: Snowflake,
pub username: String,
pub discriminator: String,
pub avatar: Option<String>,
pub bot: bool,
pub mfa_enabled: bool,
pub email: Option<String>,
}
Expand description
Represents a User on Discord.
Fields§
§id: Snowflake
The Snowflake ID of this user.
username: String
The username of this user.
discriminator: String
The four-digit number following the user’s username.
avatar: Option<String>
The user’s avatar hash, if they have one.
bot: bool
Whether or not this user is a bot.
mfa_enabled: bool
Whether or not this user has two factor authentication on their account.
email: Option<String>
The user’s email. Only available on user accounts.
Implementations§
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
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