pub struct TestOptions { /* private fields */ }Expand description
Options used by the macro-free test runtime wrappers.
Implementations§
Source§impl TestOptions
impl TestOptions
Sourcepub fn new(name: impl Into<String>) -> Self
pub fn new(name: impl Into<String>) -> Self
Creates options for a test with the given display name.
Sourcepub fn from_params(params: StartTestCaseParams) -> Self
pub fn from_params(params: StartTestCaseParams) -> Self
Creates options from low-level lifecycle start parameters.
Sourcepub fn with_full_name(self, full_name: impl Into<String>) -> Self
pub fn with_full_name(self, full_name: impl Into<String>) -> Self
Sets the test full name.
Sourcepub fn with_history_id(self, history_id: impl Into<String>) -> Self
pub fn with_history_id(self, history_id: impl Into<String>) -> Self
Sets an explicit history identifier.
Sourcepub fn with_test_case_id(self, test_case_id: impl Into<String>) -> Self
pub fn with_test_case_id(self, test_case_id: impl Into<String>) -> Self
Sets an explicit test case identifier.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Sets the markdown description.
Sourcepub fn with_description_html(self, description: impl Into<String>) -> Self
pub fn with_description_html(self, description: impl Into<String>) -> Self
Sets the HTML description.
Sourcepub fn with_label(
self,
name: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_label( self, name: impl Into<String>, value: impl Into<String>, ) -> Self
Adds an initial label.
Sourcepub fn with_allure_id(self, value: impl Into<String>) -> Self
pub fn with_allure_id(self, value: impl Into<String>) -> Self
Adds an initial Allure ID label.
Sourcepub fn with_manifest_dir(self, manifest_dir: impl Into<String>) -> Self
pub fn with_manifest_dir(self, manifest_dir: impl Into<String>) -> Self
Sets the Cargo manifest directory used for package metadata lookup.
Sourcepub fn with_module_path(self, module_path: impl Into<String>) -> Self
pub fn with_module_path(self, module_path: impl Into<String>) -> Self
Sets the Rust module path used for package metadata lookup.
Sourcepub fn with_title_path<I, V>(self, title_path: I) -> Self
pub fn with_title_path<I, V>(self, title_path: I) -> Self
Sets the title path.
Sourcepub fn with_source(
self,
file: impl AsRef<str>,
manifest_dir: impl Into<String>,
module_path: impl Into<String>,
) -> Self
pub fn with_source( self, file: impl AsRef<str>, manifest_dir: impl Into<String>, module_path: impl Into<String>, ) -> Self
Sets source-location metadata used for title path and package metadata labels.
Sourcepub fn with_framework(self, framework: impl Into<String>) -> Self
pub fn with_framework(self, framework: impl Into<String>) -> Self
Sets the framework label value.
Sourcepub fn without_framework(self) -> Self
pub fn without_framework(self) -> Self
Disables the framework label.
Sourcepub fn without_synthetic_suite_labels(self) -> Self
pub fn without_synthetic_suite_labels(self) -> Self
Disables synthetic suite labels.
Sourcepub fn with_panic_status(self, status: Status) -> Self
pub fn with_panic_status(self, status: Status) -> Self
Sets the status to use for unclassified panics.
Trait Implementations§
Source§impl Clone for TestOptions
impl Clone for TestOptions
Source§fn clone(&self) -> TestOptions
fn clone(&self) -> TestOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TestOptions
impl Debug for TestOptions
Source§impl From<StartTestCaseParams> for TestOptions
impl From<StartTestCaseParams> for TestOptions
Source§fn from(params: StartTestCaseParams) -> Self
fn from(params: StartTestCaseParams) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TestOptions
impl RefUnwindSafe for TestOptions
impl Send for TestOptions
impl Sync for TestOptions
impl Unpin for TestOptions
impl UnsafeUnpin for TestOptions
impl UnwindSafe for TestOptions
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