Struct twilight_model::gateway::payload::incoming::invite_create::PartialUser
source · pub struct PartialUser {
pub avatar: Option<ImageHash>,
pub discriminator: u16,
pub id: Id<UserMarker>,
pub username: String,
}
Expand description
Information about the user whose stream to display for a voice channel stream invite.
Fields§
§avatar: Option<ImageHash>
Hash of the user’s avatar.
discriminator: u16
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.
id: Id<UserMarker>
ID of the user.
username: String
Username of the user.
Implementations§
source§impl PartialUser
impl PartialUser
sourcepub const fn discriminator(&self) -> DiscriminatorDisplay
pub const fn discriminator(&self) -> DiscriminatorDisplay
Create a Display
formatter for a user discriminator.
Trait Implementations§
source§impl Clone for PartialUser
impl Clone for PartialUser
source§fn clone(&self) -> PartialUser
fn clone(&self) -> PartialUser
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 PartialUser
impl Debug for PartialUser
source§impl<'de> Deserialize<'de> for PartialUser
impl<'de> Deserialize<'de> for PartialUser
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 Hash for PartialUser
impl Hash for PartialUser
source§impl PartialEq<PartialUser> for PartialUser
impl PartialEq<PartialUser> for PartialUser
source§fn eq(&self, other: &PartialUser) -> bool
fn eq(&self, other: &PartialUser) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PartialUser
impl Serialize for PartialUser
impl Eq for PartialUser
impl StructuralEq for PartialUser
impl StructuralPartialEq for PartialUser
Auto Trait Implementations§
impl RefUnwindSafe for PartialUser
impl Send for PartialUser
impl Sync for PartialUser
impl Unpin for PartialUser
impl UnwindSafe for PartialUser
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