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 for PartialUser
impl PartialEq for PartialUser
Source§impl Serialize for PartialUser
impl Serialize for PartialUser
impl Eq for PartialUser
impl StructuralPartialEq for PartialUser
Auto Trait Implementations§
impl Freeze for PartialUser
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