pub struct Mapping<T> {
pub pattern: Pattern,
pub value: T,
pub sequence_number: usize,
}
Expand description
An association of a pattern with its value, along with a sequence number providing a sort order in relation to its peers.
Fields§
§pattern: Pattern
The pattern itself, like /target/*
value: T
The value associated with the pattern.
sequence_number: usize
Typically the line number in the file the pattern was parsed from.
Trait Implementations§
source§impl<T: Ord> Ord for Mapping<T>
impl<T: Ord> Ord for Mapping<T>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: PartialEq> PartialEq<Mapping<T>> for Mapping<T>
impl<T: PartialEq> PartialEq<Mapping<T>> for Mapping<T>
source§impl<T: PartialOrd> PartialOrd<Mapping<T>> for Mapping<T>
impl<T: PartialOrd> PartialOrd<Mapping<T>> for Mapping<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T: Eq> Eq for Mapping<T>
impl<T> StructuralEq for Mapping<T>
impl<T> StructuralPartialEq for Mapping<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Mapping<T>where T: RefUnwindSafe,
impl<T> Send for Mapping<T>where T: Send,
impl<T> Sync for Mapping<T>where T: Sync,
impl<T> Unpin for Mapping<T>where T: Unpin,
impl<T> UnwindSafe for Mapping<T>where T: UnwindSafe,
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