pub struct UserUpdate(pub CurrentUser);Expand description
The data of the User Update dispatch event: the bot’s own user changed.
discord.js counterpart: the UserUpdate event (for the client user).
Dereferences to the contained CurrentUser.
Tuple Fields§
§0: CurrentUserMethods from Deref<Target = CurrentUser>§
Sourcepub fn display_name(&self) -> &str
pub fn display_name(&self) -> &str
Returns the global display name if set, otherwise the username.
discord.js counterpart: User#displayName.
Trait Implementations§
Source§impl Clone for UserUpdate
impl Clone for UserUpdate
Source§impl Debug for UserUpdate
impl Debug for UserUpdate
Source§impl Deref for UserUpdate
impl Deref for UserUpdate
Source§type Target = CurrentUser
type Target = CurrentUser
The resulting type after dereferencing.
Source§fn deref(&self) -> &CurrentUser
fn deref(&self) -> &CurrentUser
Dereferences the value.
Source§impl DerefMut for UserUpdate
impl DerefMut for UserUpdate
Source§fn deref_mut(&mut self) -> &mut CurrentUser
fn deref_mut(&mut self) -> &mut CurrentUser
Mutably dereferences the value.
Source§impl<'de> Deserialize<'de> for UserUpdate
impl<'de> Deserialize<'de> for UserUpdate
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
Source§impl From<UserUpdate> for CurrentUser
impl From<UserUpdate> for CurrentUser
Source§fn from(event: UserUpdate) -> Self
fn from(event: UserUpdate) -> Self
Converts to this type from the input type.
Source§impl PartialEq for UserUpdate
impl PartialEq for UserUpdate
Source§impl Serialize for UserUpdate
impl Serialize for UserUpdate
impl StructuralPartialEq for UserUpdate
Auto Trait Implementations§
impl Freeze for UserUpdate
impl RefUnwindSafe for UserUpdate
impl Send for UserUpdate
impl Sync for UserUpdate
impl Unpin for UserUpdate
impl UnsafeUnpin for UserUpdate
impl UnwindSafe for UserUpdate
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