pub struct Contest {Show 17 fields
pub id: u64,
pub name: String,
pub contest_type: ContestType,
pub phase: ContestPhase,
pub frozen: bool,
pub duration_seconds: u64,
pub start_time_seconds: Option<u64>,
pub relative_time_seconds: Option<i64>,
pub prepared_by: Option<String>,
pub website_url: Option<String>,
pub description: Option<String>,
pub difficulty: Option<u8>,
pub kind: Option<String>,
pub icpc_region: Option<String>,
pub country: Option<String>,
pub city: Option<String>,
pub season: Option<String>,
}
Expand description
A single contest.
Fields§
§id: u64
§name: String
§contest_type: ContestType
§phase: ContestPhase
§frozen: bool
§duration_seconds: u64
§start_time_seconds: Option<u64>
§relative_time_seconds: Option<i64>
§prepared_by: Option<String>
§website_url: Option<String>
§description: Option<String>
§difficulty: Option<u8>
§kind: Option<String>
§icpc_region: Option<String>
§country: Option<String>
§city: Option<String>
§season: Option<String>
Implementations§
Source§impl Contest
API methods described on Codeforces API page.
impl Contest
API methods described on Codeforces API page.
Sourcepub async fn list(client: &Client, with_gym: bool) -> Result<Vec<Contest>>
pub async fn list(client: &Client, with_gym: bool) -> Result<Vec<Contest>>
Gets a list of all contests.
Sourcepub async fn standings(
client: &Client,
contest_id: u64,
opts: impl FnOnce(&mut ContestRankingsBuilder) -> &mut ContestRankingsBuilder,
) -> Result<(Contest, Vec<Problem>, Vec<RanklistRow>)>
pub async fn standings( client: &Client, contest_id: u64, opts: impl FnOnce(&mut ContestRankingsBuilder) -> &mut ContestRankingsBuilder, ) -> Result<(Contest, Vec<Problem>, Vec<RanklistRow>)>
Gets the standings of a contest.
https://codeforces.com/apiHelp/methods#contest.standings
Source§impl Contest
APIs provided as methods.
impl Contest
APIs provided as methods.
Sourcepub async fn get_standings(
&self,
client: &Client,
opts: impl FnOnce(&mut ContestRankingsBuilder) -> &mut ContestRankingsBuilder,
) -> Result<(Vec<Problem>, Vec<RanklistRow>)>
pub async fn get_standings( &self, client: &Client, opts: impl FnOnce(&mut ContestRankingsBuilder) -> &mut ContestRankingsBuilder, ) -> Result<(Vec<Problem>, Vec<RanklistRow>)>
Get the standings of the current contest.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Contest
impl<'de> Deserialize<'de> for Contest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Contest
impl RefUnwindSafe for Contest
impl Send for Contest
impl Sync for Contest
impl Unpin for Contest
impl UnwindSafe for Contest
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