pub(crate) async fn get_usubmissions_to_problem(
    uid: u32,
    pid: u16,
    count: u16
) -> Result<HashMap<u32, UserSubmission>, ExitFailure>
Expand description

Returns a HashMap containing the submissions the speccified user to the selected problem. This function is async, that means it has to be called inside an async function/method or using tokio::Runtime.block_on().

Arguments

  • uid - An unsigned, 32 bit number indicating the id of the user.
  • pid - An unsigned, 16 bit number indicating the id of the problem.
  • count - An unsigned, 16 bit number indicating the number of submissions. to show. Note this number is capped at 100 and will return an error if. it is more than this.

Examples

// Return the last 5 submissions of user LovetheFrogs to problem with id
// 403.
let usubs_prob: HashMap<u32, UserSubmission> = get_usubmissions_to_problem(1589052, 403,5).await?;