Struct speedrun_api::api::users::UserPersonalBestsBuilder
source · [−]pub struct UserPersonalBestsBuilder<'a> { /* private fields */ }Expand description
Builder for UserPersonalBests.
Implementations
sourceimpl<'a> UserPersonalBestsBuilder<'a>
impl<'a> UserPersonalBestsBuilder<'a>
sourcepub fn id<VALUE: Into<UserId<'a>>>(&mut self, value: VALUE) -> &mut Self
pub fn id<VALUE: Into<UserId<'a>>>(&mut self, value: VALUE) -> &mut Self
User ID or username. Using an ID is recommended over a username, because usernames can change.
sourcepub fn top<VALUE: Into<i64>>(&mut self, value: VALUE) -> &mut Self
pub fn top<VALUE: Into<i64>>(&mut self, value: VALUE) -> &mut Self
Only return PBs with a place equal or better than top (e.g. a value of 1 will return all world records for the given user)
sourcepub fn series<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
pub fn series<VALUE: Into<Cow<'a, str>>>(&mut self, value: VALUE) -> &mut Self
Series ID or abbreviation. When given, restricts results to that games and romhacks in that series.
sourcepub fn game<VALUE: Into<GameId<'a>>>(&mut self, value: VALUE) -> &mut Self
pub fn game<VALUE: Into<GameId<'a>>>(&mut self, value: VALUE) -> &mut Self
Game ID or abbreviation. When given, restricts results to that game
sourcepub fn build(
&self
) -> Result<UserPersonalBests<'a>, UserPersonalBestsBuilderError>
pub fn build(
&self
) -> Result<UserPersonalBests<'a>, UserPersonalBestsBuilderError>
Trait Implementations
sourceimpl<'a> Clone for UserPersonalBestsBuilder<'a>
impl<'a> Clone for UserPersonalBestsBuilder<'a>
sourcefn clone(&self) -> UserPersonalBestsBuilder<'a>
fn clone(&self) -> UserPersonalBestsBuilder<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for UserPersonalBestsBuilder<'a>
impl<'a> Send for UserPersonalBestsBuilder<'a>
impl<'a> Sync for UserPersonalBestsBuilder<'a>
impl<'a> Unpin for UserPersonalBestsBuilder<'a>
impl<'a> UnwindSafe for UserPersonalBestsBuilder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more