pub struct Matcher {
pub op: MatchOp,
pub name: String,
pub value: String,
}Fields§
§op: MatchOp§name: String§value: StringImplementations§
Source§impl Matcher
impl Matcher
pub fn new(op: MatchOp, name: &str, value: &str) -> Self
Sourcepub fn is_match(&self, s: &str) -> bool
pub fn is_match(&self, s: &str) -> bool
matches returns whether the matcher matches the given string value.
pub fn new_matcher( id: TokenId, name: String, value: String, ) -> Result<Matcher, String>
pub fn new_metric_name_matcher(name: String) -> Result<Matcher, String>
Trait Implementations§
impl Eq for Matcher
impl StructuralPartialEq for Matcher
Auto Trait Implementations§
impl Freeze for Matcher
impl RefUnwindSafe for Matcher
impl Send for Matcher
impl Sync for Matcher
impl Unpin for Matcher
impl UnwindSafe for Matcher
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.