Struct twilight_model::user::CurrentUser [−][src]
pub struct CurrentUser {
pub avatar: Option<String>,
pub bot: bool,
pub discriminator: String,
pub email: Option<String>,
pub flags: Option<UserFlags>,
pub id: UserId,
pub locale: Option<String>,
pub mfa_enabled: bool,
pub name: String,
pub premium_type: Option<PremiumType>,
pub public_flags: Option<UserFlags>,
pub verified: Option<bool>,
}Fields
avatar: Option<String>Expand description
User’s avatar hash.
To retrieve the url to the avatar, you can follow Discord’s documentation on Image formatting.
bot: boolExpand description
Whether the user belongs to an OAuth2 application.
discriminator: StringExpand description
Discriminator used to differentiate people with the same username.
serde
The discriminator field can be deserialized from either a string or an integer. The field will always serialize into a string due to that being the type Discord’s API uses.
email: Option<String>Expand description
User’s email address associated to the account.
Requires the email oauth scope. See Discord’s documentation for
more information.
flags: Option<UserFlags>Expand description
All flags on a user’s account.
id: UserIdExpand description
User’s id.
locale: Option<String>Expand description
User’s chosen language option.
mfa_enabled: boolExpand description
Whether the user has two factor enabled on their account.
name: StringExpand description
User’s username, not unique across the platform.
Expand description
Type of Nitro subscription on a user’s account.
public_flags: Option<UserFlags>Expand description
Public flags on a user’s account.
verified: Option<bool>Expand description
Whether the email on this account has been verified.
Requires the email oauth scope. See Discord’s documentation for
more information.
Trait Implementations
impl Clone for CurrentUser[src]
impl Clone for CurrentUser[src]fn clone(&self) -> CurrentUser[src]
fn clone(&self) -> CurrentUser[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl Debug for CurrentUser[src]
impl Debug for CurrentUser[src]impl Default for CurrentUser[src]
impl Default for CurrentUser[src]fn default() -> CurrentUser[src]
fn default() -> CurrentUser[src]Returns the “default value” for a type. Read more
impl<'de> Deserialize<'de> for CurrentUser[src]
impl<'de> Deserialize<'de> for CurrentUser[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]Deserialize this value from the given Serde deserializer. Read more
impl Hash for CurrentUser[src]
impl Hash for CurrentUser[src]impl PartialEq<CurrentUser> for CurrentUser[src]
impl PartialEq<CurrentUser> for CurrentUser[src]fn eq(&self, other: &CurrentUser) -> bool[src]
fn eq(&self, other: &CurrentUser) -> bool[src]This method tests for self and other values to be equal, and is used
by ==. Read more
fn ne(&self, other: &CurrentUser) -> bool[src]
fn ne(&self, other: &CurrentUser) -> bool[src]This method tests for !=.
impl Serialize for CurrentUser[src]
impl Serialize for CurrentUser[src]impl Eq for CurrentUser[src]
impl StructuralEq for CurrentUser[src]
impl StructuralPartialEq for CurrentUser[src]
Auto Trait Implementations
impl RefUnwindSafe for CurrentUser
impl Send for CurrentUser
impl Sync for CurrentUser
impl Unpin for CurrentUser
impl UnwindSafe for CurrentUser
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,