#[repr(C)]pub enum AttributeMatchOp {
Exists = 0,
Eq = 1,
Includes = 2,
DashMatch = 3,
Prefix = 4,
Suffix = 5,
Substring = 6,
}Expand description
Operator that compares an attribute value against a target string.
Variants§
Exists = 0
[attr] — attribute is present (any value).
Eq = 1
[attr="value"] — attribute equals value exactly.
Includes = 2
[attr~="value"] — value is one of the whitespace-separated words.
DashMatch = 3
[attr|="value"] — value equals exactly OR begins with value followed by -.
Prefix = 4
[attr^="value"] — value starts with the given prefix.
Suffix = 5
[attr$="value"] — value ends with the given suffix.
Substring = 6
[attr*="value"] — value contains the given substring.
Implementations§
Source§impl AttributeMatchOp
impl AttributeMatchOp
Sourcepub fn symbol_prefix(&self) -> &'static str
pub fn symbol_prefix(&self) -> &'static str
Returns the prefix character for the = operator (e.g. ~ for ~=).
Eq returns "", Exists is unused (no = printed at all).
Trait Implementations§
Source§impl Clone for AttributeMatchOp
impl Clone for AttributeMatchOp
Source§fn clone(&self) -> AttributeMatchOp
fn clone(&self) -> AttributeMatchOp
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AttributeMatchOp
impl Debug for AttributeMatchOp
Source§impl Default for AttributeMatchOp
impl Default for AttributeMatchOp
Source§impl Hash for AttributeMatchOp
impl Hash for AttributeMatchOp
Source§impl Ord for AttributeMatchOp
impl Ord for AttributeMatchOp
Source§fn cmp(&self, other: &AttributeMatchOp) -> Ordering
fn cmp(&self, other: &AttributeMatchOp) -> Ordering
1.21.0 (const: unstable) · 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 PartialEq for AttributeMatchOp
impl PartialEq for AttributeMatchOp
Source§fn eq(&self, other: &AttributeMatchOp) -> bool
fn eq(&self, other: &AttributeMatchOp) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for AttributeMatchOp
impl PartialOrd for AttributeMatchOp
impl Copy for AttributeMatchOp
impl Eq for AttributeMatchOp
impl StructuralPartialEq for AttributeMatchOp
Auto Trait Implementations§
impl Freeze for AttributeMatchOp
impl RefUnwindSafe for AttributeMatchOp
impl Send for AttributeMatchOp
impl Sync for AttributeMatchOp
impl Unpin for AttributeMatchOp
impl UnsafeUnpin for AttributeMatchOp
impl UnwindSafe for AttributeMatchOp
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