Struct rosu_v2::model::user::UserCompact
source · pub struct UserCompact {Show 46 fields
pub avatar_url: String,
pub country_code: CountryCode,
pub default_group: String,
pub is_active: bool,
pub is_bot: bool,
pub is_deleted: bool,
pub is_online: bool,
pub is_supporter: bool,
pub last_visit: Option<OffsetDateTime>,
pub pm_friends_only: bool,
pub profile_color: Option<String>,
pub user_id: u32,
pub username: Username,
pub account_history: Option<Vec<AccountHistory>>,
pub badges: Option<Vec<Badge>>,
pub beatmap_playcounts_count: Option<u32>,
pub country: Option<String>,
pub cover: Option<UserCover>,
pub favourite_mapset_count: Option<u32>,
pub follower_count: Option<u32>,
pub graveyard_mapset_count: Option<u32>,
pub groups: Option<Vec<Group>>,
pub guest_mapset_count: Option<u32>,
pub highest_rank: Option<UserHighestRank>,
pub is_admin: Option<bool>,
pub is_bng: Option<bool>,
pub is_full_bn: Option<bool>,
pub is_gmt: Option<bool>,
pub is_limited_bn: Option<bool>,
pub is_moderator: Option<bool>,
pub is_nat: Option<bool>,
pub is_silenced: Option<bool>,
pub loved_mapset_count: Option<u32>,
pub medals: Option<Vec<MedalCompact>>,
pub monthly_playcounts: Option<Vec<MonthlyCount>>,
pub page: Option<UserPage>,
pub previous_usernames: Option<Vec<Username>>,
pub rank_history: Option<Vec<u32>>,
pub ranked_mapset_count: Option<u32>,
pub replays_watched_counts: Option<Vec<MonthlyCount>>,
pub scores_best_count: Option<u32>,
pub scores_first_count: Option<u32>,
pub scores_recent_count: Option<u32>,
pub statistics: Option<UserStatistics>,
pub support_level: Option<u8>,
pub pending_mapset_count: Option<u32>,
}
Expand description
Mainly used for embedding in certain responses to save additional api lookups.
Fields§
§avatar_url: String
url of user’s avatar
country_code: CountryCode
two-letter code representing user’s country
default_group: String
Identifier of the default Group
the user belongs to.
is_active: bool
has this account been active in the last x months?
is_bot: bool
is this a bot account?
is_deleted: bool
has this user been deleted?
is_online: bool
is the user currently online? (either on lazer or the new website)
is_supporter: bool
does this user have supporter?
last_visit: Option<OffsetDateTime>
last access time. None
if the user hides online presence
pm_friends_only: bool
whether or not the user allows PM from other than friends
profile_color: Option<String>
colour of username/profile highlight, hex code (e.g. "#333333"
)
user_id: u32
unique identifier for user
username: Username
user’s display name
account_history: Option<Vec<AccountHistory>>
§badges: Option<Vec<Badge>>
§beatmap_playcounts_count: Option<u32>
§country: Option<String>
§cover: Option<UserCover>
§favourite_mapset_count: Option<u32>
§follower_count: Option<u32>
§graveyard_mapset_count: Option<u32>
§groups: Option<Vec<Group>>
§guest_mapset_count: Option<u32>
§highest_rank: Option<UserHighestRank>
§is_admin: Option<bool>
§is_bng: Option<bool>
§is_full_bn: Option<bool>
§is_gmt: Option<bool>
§is_limited_bn: Option<bool>
§is_moderator: Option<bool>
§is_nat: Option<bool>
§is_silenced: Option<bool>
§loved_mapset_count: Option<u32>
§medals: Option<Vec<MedalCompact>>
§monthly_playcounts: Option<Vec<MonthlyCount>>
§page: Option<UserPage>
§previous_usernames: Option<Vec<Username>>
§rank_history: Option<Vec<u32>>
§ranked_mapset_count: Option<u32>
Counts both ranked and approved mapsets
replays_watched_counts: Option<Vec<MonthlyCount>>
§scores_best_count: Option<u32>
§scores_first_count: Option<u32>
§scores_recent_count: Option<u32>
§statistics: Option<UserStatistics>
§support_level: Option<u8>
§pending_mapset_count: Option<u32>
Trait Implementations§
source§impl Clone for UserCompact
impl Clone for UserCompact
source§fn clone(&self) -> UserCompact
fn clone(&self) -> UserCompact
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 UserCompact
impl Debug for UserCompact
source§impl<'de> Deserialize<'de> for UserCompact
impl<'de> Deserialize<'de> for UserCompact
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<User> for UserCompact
impl From<User> for UserCompact
source§impl PartialEq<UserCompact> for UserCompact
impl PartialEq<UserCompact> for UserCompact
source§fn eq(&self, other: &UserCompact) -> bool
fn eq(&self, other: &UserCompact) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for UserCompact
Auto Trait Implementations§
impl RefUnwindSafe for UserCompact
impl Send for UserCompact
impl Sync for UserCompact
impl Unpin for UserCompact
impl UnwindSafe for UserCompact
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