ac-algorithm 0.2.0

Algorithm competition domain logic for ac
Documentation
//! Practice attempts: out-of-contest problem work (precision training,
//! virtual contests) recorded against the same task/solution model.

use std::time::SystemTime;

use serde::{Deserialize, Serialize};

use crate::ids::{PracticeAttemptId, SolutionId, TaskId};
use crate::verdict::LocalVerdict;

/// A recorded attempt at a task outside a rated contest.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct PracticeAttempt {
    /// Attempt identifier.
    pub id: PracticeAttemptId,
    /// Task attempted.
    pub task: TaskId,
    /// Solution used, when one was recorded.
    pub solution: Option<SolutionId>,
    /// Best local outcome observed during the attempt.
    pub outcome: Option<LocalVerdict>,
    /// When the attempt started.
    pub started_at: SystemTime,
    /// When the attempt ended, if it has.
    pub finished_at: Option<SystemTime>,
}