[][src]Struct codeforces::Contest

pub struct Contest {
    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>,
}

A single contest.

Fields

id: u64name: Stringcontest_type: ContestTypephase: ContestPhasefrozen: boolduration_seconds: u64start_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

impl Contest[src]

pub fn url(&self) -> String[src]

URL to the contest.

impl Contest[src]

API methods described on Codeforces API page.

pub async fn list<'_>(
    client: &'_ Client,
    with_gym: bool
) -> Result<Vec<Contest>>
[src]

Gets a list of all contests.

pub async fn standings<'_>(
    client: &'_ Client,
    contest_id: u64,
    opts: impl FnOnce(&mut ContestRankingsBuilder) -> &mut ContestRankingsBuilder
) -> Result<(Contest, Vec<Problem>, Vec<RanklistRow>)>
[src]

Gets the standings of a contest.

https://codeforces.com/apiHelp/methods#contest.standings

impl Contest[src]

APIs provided as methods.

pub async fn get_standings<'_, '_>(
    &'_ self,
    client: &'_ Client,
    opts: impl FnOnce(&mut ContestRankingsBuilder) -> &mut ContestRankingsBuilder
) -> Result<(Vec<Problem>, Vec<RanklistRow>)>
[src]

Get the standings of the current contest.

Trait Implementations

impl Clone for Contest[src]

impl Debug for Contest[src]

impl<'de> Deserialize<'de> for Contest[src]

Auto Trait Implementations

impl RefUnwindSafe for Contest

impl Send for Contest

impl Sync for Contest

impl Unpin for Contest

impl UnwindSafe for Contest

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.