pub struct Label {
pub name: String,
pub value: String,
}Expand description
Label for categorizing and filtering tests.
Fields§
§name: StringLabel name (can be a reserved name or custom)
value: StringLabel value
Implementations§
Source§impl Label
impl Label
Sourcepub fn from_name(name: LabelName, value: impl Into<String>) -> Label
pub fn from_name(name: LabelName, value: impl Into<String>) -> Label
Creates a label from a reserved label name.
Sourcepub fn parent_suite(value: impl Into<String>) -> Label
pub fn parent_suite(value: impl Into<String>) -> Label
Creates a parent suite label.
Sourcepub fn test_class(value: impl Into<String>) -> Label
pub fn test_class(value: impl Into<String>) -> Label
Creates a test class label.
Sourcepub fn test_method(value: impl Into<String>) -> Label
pub fn test_method(value: impl Into<String>) -> Label
Creates a test method label.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Label
impl<'de> Deserialize<'de> for Label
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Label, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Label, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Label
impl Serialize for Label
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for Label
impl StructuralPartialEq for Label
Auto Trait Implementations§
impl Freeze for Label
impl RefUnwindSafe for Label
impl Send for Label
impl Sync for Label
impl Unpin for Label
impl UnwindSafe for Label
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)