pub struct TestInfo {
pub name: String,
pub result: TestResult,
pub duration: Duration,
pub details: Vec<String>,
pub started_at: Instant,
}Expand description
Detailed information about a test execution
Fields§
§name: StringName of the test
result: TestResultTest result
duration: DurationDuration of the test execution
details: Vec<String>Additional details about the test execution
started_at: InstantTimestamp when the test started (as seconds since UNIX epoch)
Implementations§
Source§impl TestInfo
impl TestInfo
pub fn new(name: impl Into<String>) -> Self
pub fn with_result(self, result: TestResult) -> Self
pub fn add_detail(&mut self, detail: impl Into<String>)
pub fn with_detail(self, detail: impl Into<String>) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TestInfo
impl<'de> Deserialize<'de> for TestInfo
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 TestInfo
impl RefUnwindSafe for TestInfo
impl Send for TestInfo
impl Sync for TestInfo
impl Unpin for TestInfo
impl UnwindSafe for TestInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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