Struct discord_flows::model::CurrentUser
source · pub struct CurrentUser {
pub id: UserId,
pub avatar: Option<String>,
pub bot: bool,
pub discriminator: u16,
pub email: Option<String>,
pub mfa_enabled: bool,
pub name: String,
pub verified: Option<bool>,
pub public_flags: Option<UserPublicFlags>,
pub banner: Option<String>,
pub accent_colour: Option<u32>,
}
Expand description
Information about the current user.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.id: UserId
§avatar: Option<String>
§bot: bool
§discriminator: u16
§email: Option<String>
§mfa_enabled: bool
§name: String
§verified: Option<bool>
§public_flags: Option<UserPublicFlags>
§accent_colour: Option<u32>
Trait Implementations§
source§impl Clone for CurrentUser
impl Clone for CurrentUser
source§fn clone(&self) -> CurrentUser
fn clone(&self) -> CurrentUser
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CurrentUser
impl Debug for CurrentUser
source§impl Default for CurrentUser
impl Default for CurrentUser
source§fn default() -> CurrentUser
fn default() -> CurrentUser
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for CurrentUser
impl<'de> Deserialize<'de> for CurrentUser
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<CurrentUser, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<CurrentUser, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> From<&'a CurrentUser> for User
impl<'a> From<&'a CurrentUser> for User
source§fn from(user: &'a CurrentUser) -> User
fn from(user: &'a CurrentUser) -> User
Converts to this type from the input type.
source§impl<'a> From<&'a CurrentUser> for UserId
impl<'a> From<&'a CurrentUser> for UserId
source§fn from(current_user: &CurrentUser) -> UserId
fn from(current_user: &CurrentUser) -> UserId
Gets the Id of a CurrentUser
struct.
source§impl From<CurrentUser> for User
impl From<CurrentUser> for User
source§fn from(user: CurrentUser) -> User
fn from(user: CurrentUser) -> User
Converts to this type from the input type.
source§impl From<CurrentUser> for UserId
impl From<CurrentUser> for UserId
source§fn from(current_user: CurrentUser) -> UserId
fn from(current_user: CurrentUser) -> UserId
Gets the Id of a CurrentUser
struct.
source§impl Mentionable for CurrentUser
impl Mentionable for CurrentUser
source§impl Serialize for CurrentUser
impl Serialize for CurrentUser
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
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§
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