pub struct TestCaseVerdict {
pub test_case_id: i32,
pub verdict: Verdict,
pub score: f64,
pub time_used_ms: Option<i64>,
pub memory_used_kb: Option<i64>,
pub message: Option<String>,
pub stdout: Option<String>,
pub stderr: Option<String>,
}Expand description
Verdict for a single test case, returned by evaluator’s evaluate function.
Fields§
§test_case_id: i32§verdict: Verdict§score: f64§time_used_ms: Option<i64>Time used, in milliseconds.
memory_used_kb: Option<i64>Memory used, in kilobytes.
message: Option<String>§stdout: Option<String>§stderr: Option<String>Implementations§
Source§impl TestCaseVerdict
impl TestCaseVerdict
Sourcepub fn accepted(tc_id: i32) -> Self
pub fn accepted(tc_id: i32) -> Self
Convenience constructor: Accepted with default time/memory.
Sourcepub fn wrong_answer(tc_id: i32) -> Self
pub fn wrong_answer(tc_id: i32) -> Self
Convenience constructor: WrongAnswer with default time/memory.
Sourcepub fn compile_error(tc_id: i32) -> Self
pub fn compile_error(tc_id: i32) -> Self
Convenience constructor: CompileError.
Sourcepub fn system_error(tc_id: i32) -> Self
pub fn system_error(tc_id: i32) -> Self
Convenience constructor: SystemError.
Trait Implementations§
Source§impl Clone for TestCaseVerdict
impl Clone for TestCaseVerdict
Source§fn clone(&self) -> TestCaseVerdict
fn clone(&self) -> TestCaseVerdict
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TestCaseVerdict
impl Debug for TestCaseVerdict
Source§impl<'de> Deserialize<'de> for TestCaseVerdict
impl<'de> Deserialize<'de> for TestCaseVerdict
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 TestCaseVerdict
impl RefUnwindSafe for TestCaseVerdict
impl Send for TestCaseVerdict
impl Sync for TestCaseVerdict
impl Unpin for TestCaseVerdict
impl UnsafeUnpin for TestCaseVerdict
impl UnwindSafe for TestCaseVerdict
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