Struct discord_sdk::user::User
source · pub struct User {
pub id: UserId,
pub username: String,
pub discriminator: Option<u32>,
pub avatar: Option<Avatar>,
pub is_bot: bool,
}
Expand description
A Discord user.
Fields§
§id: UserId
The user’s id
username: String
The username
discriminator: Option<u32>
The user’s unique discriminator (ie. the #
avatar: Option<Avatar>
The MD5 hash of the user’s avatar
is_bot: bool
Whether the user belongs to an OAuth2 application
Trait Implementations§
source§impl<'de> Deserialize<'de> for User
impl<'de> Deserialize<'de> for User
source§fn deserialize<D>(d: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
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