pub struct UserGamesRequest<'a> { /* private fields */ }Expand description
Builder for exporting a user’s games (GET /api/games/user/{username}).
Implementations§
Source§impl<'a> UserGamesRequest<'a>
impl<'a> UserGamesRequest<'a>
Sourcepub fn since(self, timestamp: i64) -> Self
pub fn since(self, timestamp: i64) -> Self
Only games played since this timestamp (Unix milliseconds).
Sourcepub fn until(self, timestamp: i64) -> Self
pub fn until(self, timestamp: i64) -> Self
Only games played until this timestamp (Unix milliseconds).
Sourcepub fn perf_type(self, perf_type: &'a str) -> Self
pub fn perf_type(self, perf_type: &'a str) -> Self
Only games in these speeds/variants (comma-separated perf types).
Sourcepub fn color(self, color: &'a str) -> Self
pub fn color(self, color: &'a str) -> Self
Only games played as this color ("white" or "black").
Sourcepub fn analysed(self, analysed: bool) -> Self
pub fn analysed(self, analysed: bool) -> Self
Only games with (true) or without (false) computer analysis.
Sourcepub fn finished(self, finished: bool) -> Self
pub fn finished(self, finished: bool) -> Self
Include finished games (true); set false to get only ongoing games.
Sourcepub fn last_fen(self, value: bool) -> Self
pub fn last_fen(self, value: bool) -> Self
Include the X-FEN of each game’s last position (NDJSON only).
Sourcepub fn with_bookmarked(self, value: bool) -> Self
pub fn with_bookmarked(self, value: bool) -> Self
Add a bookmarked flag on games the caller has bookmarked (NDJSON only).
Sourcepub fn export(self, options: GameExportOptions) -> Self
pub fn export(self, options: GameExportOptions) -> Self
Sets the shared export-format options (moves, clocks, evals, …).
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for UserGamesRequest<'a>
impl<'a> !UnwindSafe for UserGamesRequest<'a>
impl<'a> Freeze for UserGamesRequest<'a>
impl<'a> Send for UserGamesRequest<'a>
impl<'a> Sync for UserGamesRequest<'a>
impl<'a> Unpin for UserGamesRequest<'a>
impl<'a> UnsafeUnpin for UserGamesRequest<'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