Struct steamworks::UserStats [−][src]
pub struct UserStats<Manager> { /* fields omitted */ }
Expand description
Access to the steam user interface
Implementations
pub fn find_leaderboard<F>(&self, name: &str, cb: F) where
F: FnOnce(Result<Option<Leaderboard>, SteamError>) + 'static + Send,
pub fn find_or_create_leaderboard<F>(
&self,
name: &str,
sort_method: LeaderboardSortMethod,
display_type: LeaderboardDisplayType,
cb: F
) where
F: FnOnce(Result<Option<Leaderboard>, SteamError>) + 'static + Send,
pub fn upload_leaderboard_score<F>(
&self,
leaderboard: &Leaderboard,
method: UploadScoreMethod,
score: i32,
details: &[i32],
cb: F
) where
F: FnOnce(Result<Option<LeaderboardScoreUploaded>, SteamError>) + 'static + Send,
pub fn download_leaderboard_entries<F>(
&self,
leaderboard: &Leaderboard,
request: LeaderboardDataRequest,
start: usize,
end: usize,
max_details_len: usize,
cb: F
) where
F: FnOnce(Result<Vec<LeaderboardEntry>, SteamError>) + 'static + Send,
pub fn get_leaderboard_display_type(
&self,
leaderboard: &Leaderboard
) -> Option<LeaderboardDisplayType>
pub fn get_leaderboard_display_type(
&self,
leaderboard: &Leaderboard
) -> Option<LeaderboardDisplayType>
Returns the display type of a leaderboard handle. Returns None
if the leaderboard handle is invalid.
pub fn get_leaderboard_sort_method(
&self,
leaderboard: &Leaderboard
) -> Option<LeaderboardSortMethod>
pub fn get_leaderboard_sort_method(
&self,
leaderboard: &Leaderboard
) -> Option<LeaderboardSortMethod>
Returns the sort method of a leaderboard handle. Returns None
if the leaderboard handle is invalid.
Returns the name of a leaderboard handle. Returns an empty string if the leaderboard handle is invalid.
Returns the total number of entries in a leaderboard. Returns 0 if the leaderboard handle is invalid.
Triggers a UserStatsReceived
callback.
Send the changed stats and achievements data to the server for permanent storage.
- Triggers a
UserStatsStored
callback if successful. - Triggers a
UserAchievementStored
callback if achievements have been unlocked.
Requires request_current_stats()
to have been called
and a successful UserStatsReceived
callback processed.
Sets / updates the value of a given stat for the current user
This call only changes the value in-memory and is very cheap. To commit the stats you
must call store_stats()
The specified stat must exist and match the type set on the Steamworks App Admin website.
Requires request_current_stats()
to have been called
and a successful UserStatsReceived
callback processed.
Sets / updates the value of a given stat for the current user
This call only changes the value in-memory and is very cheap. To commit the stats you
must call store_stats()
The specified stat must exist and match the type set on the Steamworks App Admin website.
Requires request_current_stats()
to have been called
and a successful UserStatsReceived
callback processed.
Access achievement API for a given achievement ‘API Name’.
Requires request_current_stats()
to have been called
and a successful UserStatsReceived
callback processed.