pub struct TestExecutionResult<T> {
pub status: ExecutionStatus,
pub result: Option<T>,
pub error: Option<TestResultError>,
pub operations: Vec<Operation>,
pub invocations: Vec<Invocation>,
pub execution_id: String,
}Expand description
Result of a test execution.
Fields§
§status: ExecutionStatusThe execution status
result: Option<T>The result value (if succeeded)
error: Option<TestResultError>The error (if failed)
operations: Vec<Operation>All operations from the execution
invocations: Vec<Invocation>Handler invocations
execution_id: StringThe execution ID
Implementations§
Source§impl<T> TestExecutionResult<T>
impl<T> TestExecutionResult<T>
Sourcepub fn success(
result: T,
operations: Vec<Operation>,
execution_id: String,
) -> Self
pub fn success( result: T, operations: Vec<Operation>, execution_id: String, ) -> Self
Create a successful result.
Sourcepub fn failure(
error: TestResultError,
operations: Vec<Operation>,
execution_id: String,
) -> Self
pub fn failure( error: TestResultError, operations: Vec<Operation>, execution_id: String, ) -> Self
Create a failed result.
Sourcepub fn running(operations: Vec<Operation>, execution_id: String) -> Self
pub fn running(operations: Vec<Operation>, execution_id: String) -> Self
Create a running/pending result.
Sourcepub fn with_invocation(self, invocation: Invocation) -> Self
pub fn with_invocation(self, invocation: Invocation) -> Self
Add an invocation to the result.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for TestExecutionResult<T>where
T: Freeze,
impl<T> RefUnwindSafe for TestExecutionResult<T>where
T: RefUnwindSafe,
impl<T> Send for TestExecutionResult<T>where
T: Send,
impl<T> Sync for TestExecutionResult<T>where
T: Sync,
impl<T> Unpin for TestExecutionResult<T>where
T: Unpin,
impl<T> UnsafeUnpin for TestExecutionResult<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for TestExecutionResult<T>where
T: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.