pub struct LeaderboardQuery { /* private fields */ }Expand description
Constructs a query for the /leaderboards/leaderboard endpoint.
Implementations§
Source§impl LeaderboardQuery
impl LeaderboardQuery
Sourcepub fn with_leaderboard(self, value: impl Into<Option<Leaderboard>>) -> Self
pub fn with_leaderboard(self, value: impl Into<Option<Leaderboard>>) -> Self
ProfileId to query.
Sourcepub fn with_query(self, value: impl Into<Option<String>>) -> Self
pub fn with_query(self, value: impl Into<Option<String>>) -> Self
Search query.
Sourcepub fn with_country(self, value: impl Into<Option<CountryCode>>) -> Self
pub fn with_country(self, value: impl Into<Option<CountryCode>>) -> Self
Search by country.
Source§impl LeaderboardQuery
impl LeaderboardQuery
Sourcepub async fn get(
self,
limit: usize,
) -> Result<impl Stream<Item = Result<LeaderboardEntry>>>
pub async fn get( self, limit: usize, ) -> Result<impl Stream<Item = Result<LeaderboardEntry>>>
Get the leaderboard data. Returns a stream of LeaderboardEntry.
Trait Implementations§
Source§impl Default for LeaderboardQuery
impl Default for LeaderboardQuery
Source§fn default() -> LeaderboardQuery
fn default() -> LeaderboardQuery
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LeaderboardQuery
impl RefUnwindSafe for LeaderboardQuery
impl Send for LeaderboardQuery
impl Sync for LeaderboardQuery
impl Unpin for LeaderboardQuery
impl UnwindSafe for LeaderboardQuery
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more