pub struct Matching {
pub op: MatchingOp,
pub labels: Vec<String>,
pub group: Option<MatchingGroup>,
pub span: Option<Span>,
}
Expand description
An operator matching clause
Fields§
§op: MatchingOp
§labels: Vec<String>
A list of labels to which the operator is applied
group: Option<MatchingGroup>
An optional grouping clause for many-to-one and one-to-many vector matches
span: Option<Span>
Implementations§
Source§impl Matching
impl Matching
pub fn new(op: MatchingOp) -> Self
Sourcepub fn op(self, op: MatchingOp) -> Self
pub fn op(self, op: MatchingOp) -> Self
Replaces this Matching’s operator
Sourcepub fn labels(self, labels: &[&str]) -> Self
pub fn labels(self, labels: &[&str]) -> Self
Replaces this Matching’s labels with the given set
Sourcepub fn clear_labels(self) -> Self
pub fn clear_labels(self) -> Self
Clears this Matching’s set of labels
Sourcepub fn group(self, group: MatchingGroup) -> Self
pub fn group(self, group: MatchingGroup) -> Self
Sets or replaces this Matching’s group clause
Sourcepub fn clear_group(self) -> Self
pub fn clear_group(self) -> Self
Clears this Matching’s group clause
pub fn span<S: Into<Span>>(self, span: S) -> Self
Trait Implementations§
impl Eq for Matching
impl StructuralPartialEq for Matching
Auto Trait Implementations§
impl Freeze for Matching
impl RefUnwindSafe for Matching
impl Send for Matching
impl Sync for Matching
impl Unpin for Matching
impl UnwindSafe for Matching
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