Struct rosu_v2::model::user::User

source ·
pub struct User {
Show 65 fields pub avatar_url: String, pub comments_count: usize, pub country: String, pub country_code: CountryCode, pub cover: UserCover, pub default_group: String, pub discord: Option<String>, pub has_supported: bool, pub interests: Option<String>, pub is_active: bool, pub is_bot: bool, pub is_deleted: bool, pub is_online: bool, pub is_supporter: bool, pub join_date: OffsetDateTime, pub kudosu: UserKudosu, pub last_visit: Option<OffsetDateTime>, pub location: Option<String>, pub max_blocks: u32, pub max_friends: u32, pub mode: GameMode, pub occupation: Option<String>, pub playstyle: Option<Vec<Playstyle>>, pub pm_friends_only: bool, pub forum_post_count: u32, pub profile_color: Option<String>, pub profile_order: Vec<ProfilePage>, pub title: Option<String>, pub title_url: Option<String>, pub twitter: Option<String>, pub user_id: u32, pub username: Username, pub website: Option<String>, pub account_history: Option<Vec<AccountHistory>>, pub badges: Option<Vec<Badge>>, pub beatmap_playcounts_count: Option<u32>, 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 mapping_follower_count: Option<u32>, 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>, pub medals: Option<Vec<MedalCompact>>,
}
Expand description

Represents a User. Extends UserCompact object with additional attributes.

Fields§

§avatar_url: String

url of user’s avatar

§comments_count: usize

number of forum comments

§country: String

country of the user

§country_code: CountryCode

two-letter code representing user’s country

§cover: UserCover

urls for the profile cover

§default_group: String

Identifier of the default Group the user belongs to.

§discord: Option<String>

discord tag, None if not specified by the user

§has_supported: bool

whether or not ever being a supporter in the past

§interests: Option<String>

interests, None if not specified by the user

§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?

§join_date: OffsetDateTime

date of account creation

§kudosu: UserKudosu

current kudosu of the user

§last_visit: Option<OffsetDateTime>

last access time. None if the user hides online presence

§location: Option<String>

location of the user, None if disabled by the user

§max_blocks: u32

maximum number of users allowed to be blocked

§max_friends: u32

maximum number of friends allowed to be added

§mode: GameMode

mode for this struct

§occupation: Option<String>

occupation, None if not specified by the user

§playstyle: Option<Vec<Playstyle>>

Device choices of the user

§pm_friends_only: bool

whether or not the user allows PM from other than friends

§forum_post_count: u32

number of forum posts

§profile_color: Option<String>

colour of username/profile highlight, hex code (e.g. "#333333")

§profile_order: Vec<ProfilePage>

ordered list of sections in user profile page

§title: Option<String>

user-specific title

§title_url: Option<String>

URL to the user title

§twitter: Option<String>

twitter handle, None if not specified by the user

§user_id: u32

unique identifier for user

§username: Username

user’s display name

§website: Option<String>

website, None if not specified by the user

§account_history: Option<Vec<AccountHistory>>§badges: Option<Vec<Badge>>§beatmap_playcounts_count: Option<u32>§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>§mapping_follower_count: Option<u32>§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>§medals: Option<Vec<MedalCompact>>

Trait Implementations§

source§

impl Clone for User

source§

fn clone(&self) -> User

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for User

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for User

source§

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

source§

fn from(user: User) -> Self

Converts to this type from the input type.
source§

impl PartialEq<User> for User

source§

fn eq(&self, other: &User) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for User

Auto Trait Implementations§

§

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,