pub struct Myself {
pub id: Snowflake,
pub username: String,
pub discriminator: String,
pub avatar: Option<String>,
pub bot: bool,
pub mfa_enabled: bool,
pub verified: bool,
pub email: Option<String>,
}
Expand description
Data about the current user. (relevant Discord docs)
Fields§
§id: Snowflake
User ID
username: String
Username, not unique
discriminator: String
4-digit Discord tag
avatar: Option<String>
User’s avatar hash
bot: bool
Whether this is a bot account
mfa_enabled: bool
Whether the account has MFA enabled
verified: bool
Whether the email address on this account has been verified
email: Option<String>
Email address
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Myself
impl<'de> Deserialize<'de> for Myself
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 Myself
impl RefUnwindSafe for Myself
impl Send for Myself
impl Sync for Myself
impl Unpin for Myself
impl UnwindSafe for Myself
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more