pub struct User {Show 14 fields
pub id: String,
pub username: String,
pub discriminator: String,
pub display_name: Option<String>,
pub avatar: Option<Attachment>,
pub relations: Option<Vec<Relationship>>,
pub badges: Option<i32>,
pub status: Option<UserStatus>,
pub profile: Option<UserProfile>,
pub flags: Option<UserFlags>,
pub privileged: bool,
pub bot: Option<BotInformation>,
pub relationship: Option<RelationshipStatus>,
pub online: Option<bool>,
}
Expand description
Representiation of a User on Revolt.
Fields§
§id: String
Unique Id
username: String
Username
discriminator: String
User discriminator (four numbers after the username)
display_name: Option<String>
User’s display name
avatar: Option<Attachment>
Avatar attachment
relations: Option<Vec<Relationship>>
Relationships with other users
badges: Option<i32>
Bitfield of user badges
status: Option<UserStatus>
User’s current status
profile: Option<UserProfile>
User’s profile page
flags: Option<UserFlags>
Enum of user flags
privileged: bool
Whether this user is privileged
bot: Option<BotInformation>
Bot information
relationship: Option<RelationshipStatus>
Current session user’s relationship with this user
online: Option<bool>
Whether this user is currently online
Trait Implementations§
Source§impl<'de> Deserialize<'de> for User
impl<'de> Deserialize<'de> for User
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
Auto Trait Implementations§
impl Freeze for User
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnwindSafe for User
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