pub struct GameRecordsBuilder<'a> { /* private fields */ }Expand description
Builder for GameRecords.
Implementations§
Source§impl<'a> GameRecordsBuilder<'a>
impl<'a> GameRecordsBuilder<'a>
Sourcepub fn id<VALUE: Into<GameId<'a>>>(&mut self, value: VALUE) -> &mut Self
pub fn id<VALUE: Into<GameId<'a>>>(&mut self, value: VALUE) -> &mut Self
ID of the game to retrieve records for.
Sourcepub fn top<VALUE: Into<i64>>(&mut self, value: VALUE) -> &mut Self
pub fn top<VALUE: Into<i64>>(&mut self, value: VALUE) -> &mut Self
Return the top places (this can result in more than top runs!). Defaults to 3.
Sourcepub fn scope<VALUE: Into<LeaderboardScope>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn scope<VALUE: Into<LeaderboardScope>>( &mut self, value: VALUE, ) -> &mut Self
When set to LeaderboardScope::FullGame, only full-game categories will be included. When set to LeaderboardScope::Levels only individual levels are returned. Defaults to LeaderboardScope::All.
Sourcepub fn miscellaneous<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn miscellaneous<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
When false, miscellaneous categories will not be included in the results.
Sourcepub fn skip_empty<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn skip_empty<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
When true, empty leaderboards will not be included in the results.
Sourcepub fn build(&self) -> Result<GameRecords<'a>, GameRecordsBuilderError>
pub fn build(&self) -> Result<GameRecords<'a>, GameRecordsBuilderError>
Source§impl GameRecordsBuilder<'_>
impl GameRecordsBuilder<'_>
Sourcepub fn embed(&mut self, embed: LeaderboardEmbeds) -> &mut Self
pub fn embed(&mut self, embed: LeaderboardEmbeds) -> &mut Self
Add an embedded resource to this result.
Sourcepub fn embeds<I>(&mut self, iter: I) -> &mut Selfwhere
I: Iterator<Item = LeaderboardEmbeds>,
pub fn embeds<I>(&mut self, iter: I) -> &mut Selfwhere
I: Iterator<Item = LeaderboardEmbeds>,
Add multiple embedded resources to this result.
Trait Implementations§
Source§impl<'a> Clone for GameRecordsBuilder<'a>
impl<'a> Clone for GameRecordsBuilder<'a>
Source§fn clone(&self) -> GameRecordsBuilder<'a>
fn clone(&self) -> GameRecordsBuilder<'a>
Returns a duplicate 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 moreAuto Trait Implementations§
impl<'a> Freeze for GameRecordsBuilder<'a>
impl<'a> RefUnwindSafe for GameRecordsBuilder<'a>
impl<'a> Send for GameRecordsBuilder<'a>
impl<'a> Sync for GameRecordsBuilder<'a>
impl<'a> Unpin for GameRecordsBuilder<'a>
impl<'a> UnwindSafe for GameRecordsBuilder<'a>
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