pub struct User {
pub gender: String,
pub name: String,
pub subscriber: String,
pub url: String,
pub country: String,
pub registered: Registered,
pub user_type: String,
pub age: String,
pub real_name: String,
/* private fields */
}Expand description
Response to a user.getInfo request
Returns information about a user’s profile. Certain fields, such as bootstrap and images,
have been omitted from deserialization since they are not used in this application
Fields§
§gender: StringThe user’s gender
name: StringThe user’s username
subscriber: StringIndicates if the user is a subscriber to Last.fm
url: StringThe user’s profile URL
country: StringThe user’s country
registered: RegisteredThe date and time the user registered their profile, represented as a unix timestamp
See Registered
user_type: StringThe user’s profile type. Could be a normal user or a staff user.
age: StringThe user’s age
real_name: StringThe user’s real name, if provided
Implementations§
Source§impl User
impl User
Sourcepub fn playlists_formatted(&self) -> String
pub fn playlists_formatted(&self) -> String
Get the number of playlists created by the user, formatted according to the user’s system locale
Sourcepub fn play_count(&self) -> i32
pub fn play_count(&self) -> i32
Get the total number of scrobbles by the user
pub fn play_count_formatted(&self) -> String
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