pub struct MatchingGroup {
pub op: MatchingGroupOp,
pub labels: Vec<String>,
pub span: Option<Span>,
}
Expand description
A matching clause’s nested grouping clause
Fields§
§op: MatchingGroupOp
The matching group’s operator type (left or right)
labels: Vec<String>
A list of labels to copy to the opposite side of the group operator, i.e.
group_left(foo) copies the label foo
from the right hand side
span: Option<Span>
Implementations§
Source§impl MatchingGroup
impl MatchingGroup
pub fn new(op: MatchingGroupOp) -> Self
Sourcepub fn op(self, op: MatchingGroupOp) -> Self
pub fn op(self, op: MatchingGroupOp) -> Self
Replaces this Matching’s operator
Sourcepub fn labels(self, labels: &[&str]) -> Self
pub fn labels(self, labels: &[&str]) -> Self
Replaces this MatchingGroup’s labels with the given set
Sourcepub fn clear_labels(self) -> Self
pub fn clear_labels(self) -> Self
Clears this MatchingGroup’s set of labels
pub fn span<S: Into<Span>>(self, span: S) -> Self
Trait Implementations§
Source§impl Clone for MatchingGroup
impl Clone for MatchingGroup
Source§fn clone(&self) -> MatchingGroup
fn clone(&self) -> MatchingGroup
Returns a duplicate of the value. Read more
1.0.0 · 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 MatchingGroup
impl Debug for MatchingGroup
Source§impl Display for MatchingGroup
impl Display for MatchingGroup
Source§impl PartialEq for MatchingGroup
impl PartialEq for MatchingGroup
impl Eq for MatchingGroup
impl StructuralPartialEq for MatchingGroup
Auto Trait Implementations§
impl Freeze for MatchingGroup
impl RefUnwindSafe for MatchingGroup
impl Send for MatchingGroup
impl Sync for MatchingGroup
impl Unpin for MatchingGroup
impl UnwindSafe for MatchingGroup
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