pub struct LevelRecordsBuilder<'a> { /* private fields */ }
Expand description
Builder for LevelRecords
.
Implementations§
Source§impl<'a> LevelRecordsBuilder<'a>
impl<'a> LevelRecordsBuilder<'a>
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 top
number of places (default: 3).
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
Do not return empty leaderboards when true
.
Sourcepub fn build(&self) -> Result<LevelRecords<'a>, LevelRecordsBuilderError>
pub fn build(&self) -> Result<LevelRecords<'a>, LevelRecordsBuilderError>
Source§impl LevelRecordsBuilder<'_>
impl LevelRecordsBuilder<'_>
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 LevelRecordsBuilder<'a>
impl<'a> Clone for LevelRecordsBuilder<'a>
Source§fn clone(&self) -> LevelRecordsBuilder<'a>
fn clone(&self) -> LevelRecordsBuilder<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for LevelRecordsBuilder<'a>
impl<'a> RefUnwindSafe for LevelRecordsBuilder<'a>
impl<'a> Send for LevelRecordsBuilder<'a>
impl<'a> Sync for LevelRecordsBuilder<'a>
impl<'a> Unpin for LevelRecordsBuilder<'a>
impl<'a> UnwindSafe for LevelRecordsBuilder<'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