pub struct Label {
pub key: String,
pub op: LabelOp,
pub value: String,
pub span: Option<Span>,
}
Expand description
A label matcher in a selector
Fields§
§key: String
§op: LabelOp
§value: String
§span: Option<Span>
Implementations§
Source§impl Label
impl Label
pub fn new<S: Into<String>>(op: LabelOp, key: S, value: S) -> Self
pub fn equal<S: Into<String>>(key: S, value: S) -> Self
pub fn not_equal<S: Into<String>>(key: S, value: S) -> Self
pub fn regex_equal<S: Into<String>>(key: S, value: S) -> Self
pub fn regex_notequal<S: Into<String>>(key: S, value: S) -> Self
pub fn key<S: Into<String>>(self, key: S) -> Self
pub fn op(self, op: LabelOp) -> Self
pub fn value<S: Into<String>>(self, value: S) -> Self
pub fn span<S: Into<Span>>(self, span: S) -> Self
Trait Implementations§
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§
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