Struct twilight_model::user::UserProfile
source · [−]pub struct UserProfile {Show 13 fields
pub accent_color: Option<u32>,
pub avatar: Option<ImageHash>,
pub banner: Option<ImageHash>,
pub bot: bool,
pub discriminator: u16,
pub email: Option<String>,
pub flags: Option<UserFlags>,
pub id: Id<UserMarker>,
pub locale: Option<String>,
pub mfa_enabled: Option<bool>,
pub name: String,
pub premium_type: Option<PremiumType>,
pub verified: Option<bool>,
}Fields
accent_color: Option<u32>Accent color of the user’s banner.
This is an integer representation of a hexadecimal color code.
avatar: Option<ImageHash>Hash of the user’s banner image.
bot: booldiscriminator: u16Discriminator 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>flags: Option<UserFlags>id: Id<UserMarker>locale: Option<String>mfa_enabled: Option<bool>name: Stringverified: Option<bool>Implementations
sourceimpl UserProfile
impl UserProfile
sourcepub const fn discriminator(&self) -> DiscriminatorDisplay
pub const fn discriminator(&self) -> DiscriminatorDisplay
Create a Display formatter for a user discriminator.
Trait Implementations
sourceimpl Clone for UserProfile
impl Clone for UserProfile
sourcefn clone(&self) -> UserProfile
fn clone(&self) -> UserProfile
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for UserProfile
impl Debug for UserProfile
sourceimpl<'de> Deserialize<'de> for UserProfile
impl<'de> Deserialize<'de> for UserProfile
sourcefn 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
sourceimpl Hash for UserProfile
impl Hash for UserProfile
sourceimpl PartialEq<UserProfile> for UserProfile
impl PartialEq<UserProfile> for UserProfile
sourcefn eq(&self, other: &UserProfile) -> bool
fn eq(&self, other: &UserProfile) -> bool
sourceimpl Serialize for UserProfile
impl Serialize for UserProfile
impl Eq for UserProfile
impl StructuralEq for UserProfile
impl StructuralPartialEq for UserProfile
Auto Trait Implementations
impl RefUnwindSafe for UserProfile
impl Send for UserProfile
impl Sync for UserProfile
impl Unpin for UserProfile
impl UnwindSafe for UserProfile
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more