pub struct TestResultHierarchy { /* private fields */ }Implementations§
Source§impl TestResultHierarchy
Stores arbitrarily nested parent test groups and child cases. Supports creation
in DFS traversal order
impl TestResultHierarchy
Stores arbitrarily nested parent test groups and child cases. Supports creation in DFS traversal order
Sourcepub fn pop_traversal(&mut self)
pub fn pop_traversal(&mut self)
Signifies the end of the current group’s traversal during construction.
Must be paired with a prior call to TestResultHierarchy::add_group.
Sourcepub fn add_group(&mut self, group_name: &str)
pub fn add_group(&mut self, group_name: &str)
Adds a new group as a child of the current group. Caller is responsible
for calling TestResultHierarchy::pop_traversal once the group is done
being traversed.
Sourcepub fn add_case(&mut self, test_case: TestResult)
pub fn add_case(&mut self, test_case: TestResult)
Adds a new test example as a child of the current group.
Asserts that test_case.info is not TestInfo::Group.
pub fn iter(&self) -> TestResultIterWithDepth<'_> ⓘ
Trait Implementations§
Source§impl Debug for TestResultHierarchy
impl Debug for TestResultHierarchy
Source§impl Default for TestResultHierarchy
impl Default for TestResultHierarchy
Source§fn default() -> TestResultHierarchy
fn default() -> TestResultHierarchy
Returns the “default value” for a type. Read more
Source§impl JsonSchema for TestResultHierarchy
impl JsonSchema for TestResultHierarchy
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for TestResultHierarchy
impl RefUnwindSafe for TestResultHierarchy
impl Send for TestResultHierarchy
impl Sync for TestResultHierarchy
impl Unpin for TestResultHierarchy
impl UnwindSafe for TestResultHierarchy
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