Enum codeforces_api::requests::CFProblemsetCommand[][src]

pub enum CFProblemsetCommand {
    Problems {
        tags: Option<Vec<String>>,
        problemset_name: Option<String>,
    },
    RecentStatus {
        count: i64,
        problemset_name: Option<String>,
    },
}

Wrapper enum for all API methods of form problemset.<method>.

More details for the problemset command can be found here.

Variants

Problems

Struct for sending problemset.problems requests to the Codeforces API.

Returns all problems from problemset. Problems can be filtered by tags.

If correctly parsed, the response object will be of type responses::CFResult::CFProblemset.

More details for the problemset.problems command can be found here.

Examples

let x = CFProblemsetCommand::Problems {
    tags: Some(vec!["dp".to_string(), "greedy".to_string()]),
    problemset_name: None,
};
 
match x.get(api_key, api_secret) {
    Ok(CFResult::CFProblemset(p)) => {
        // your code here
    },
    _ => {
        panic!("API request failed");
    }
}

Fields of Problems

tags: Option<Vec<String>>

Optional Vec of tags to search for (eg. "dp").

problemset_name: Option<String>

Optional custom problemset's short name, like acmsguru.

RecentStatus

Struct for sending problemset.recentStatus requests to the Codeforces API.

Returns recent submissions.

If correctly parsed, the response object will be of type responses::CFResult::CFSubmissionVec.

More details for the problemset.recentStatus command can be found here.

Examples

let x = CFProblemsetCommand::RecentStatus {
    count: 10,
    problemset_name: None,
};
 
match x.get(api_key, api_secret) {
    Ok(CFResult::CFSubmissionVec(v)) => {
        // your code here
    },
    _ => {
        panic!("API request failed");
    }
}

Fields of RecentStatus

count: i64

Number of submissions to return. Can be up to 1000.

problemset_name: Option<String>

Optional custom problemset's short name, like acmsguru.

Trait Implementations

impl CFAPIRequestable for CFProblemsetCommand[src]

impl Clone for CFProblemsetCommand[src]

impl Debug for CFProblemsetCommand[src]

impl Eq for CFProblemsetCommand[src]

impl PartialEq<CFProblemsetCommand> for CFProblemsetCommand[src]

impl StructuralEq for CFProblemsetCommand[src]

impl StructuralPartialEq for CFProblemsetCommand[src]

Auto Trait Implementations

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,