pub struct SyntaxOperator(/* private fields */);
Expand description
Defines the different operators allowed within a regex syntax.
Implementations§
Source§impl SyntaxOperator
impl SyntaxOperator
Sourcepub const SYNTAX_OPERATOR_DOT_ANYCHAR: Self
pub const SYNTAX_OPERATOR_DOT_ANYCHAR: Self
.
Sourcepub const SYNTAX_OPERATOR_ASTERISK_ZERO_INF: Self
pub const SYNTAX_OPERATOR_ASTERISK_ZERO_INF: Self
*
Sourcepub const SYNTAX_OPERATOR_PLUS_ONE_INF: Self
pub const SYNTAX_OPERATOR_PLUS_ONE_INF: Self
+
Sourcepub const SYNTAX_OPERATOR_QMARK_ZERO_ONE: Self
pub const SYNTAX_OPERATOR_QMARK_ZERO_ONE: Self
?
Sourcepub const SYNTAX_OPERATOR_QMARK_CAPITAL_P_NAME: Self
pub const SYNTAX_OPERATOR_QMARK_CAPITAL_P_NAME: Self
?P
Sourcepub const SYNTAX_OPERATOR_BRACE_INTERVAL: Self
pub const SYNTAX_OPERATOR_BRACE_INTERVAL: Self
{lower,upper}
Sourcepub const SYNTAX_OPERATOR_ESC_BRACE_INTERVAL: Self
pub const SYNTAX_OPERATOR_ESC_BRACE_INTERVAL: Self
\{lower,upper\}
Sourcepub const SYNTAX_OPERATOR_VBAR_ALT: Self
pub const SYNTAX_OPERATOR_VBAR_ALT: Self
|
Sourcepub const SYNTAX_OPERATOR_ESC_VBAR_ALT: Self
pub const SYNTAX_OPERATOR_ESC_VBAR_ALT: Self
\|
Sourcepub const SYNTAX_OPERATOR_LPAREN_SUBEXP: Self
pub const SYNTAX_OPERATOR_LPAREN_SUBEXP: Self
(...)
Sourcepub const SYNTAX_OPERATOR_ESC_LPAREN_SUBEXP: Self
pub const SYNTAX_OPERATOR_ESC_LPAREN_SUBEXP: Self
\(...\)
Sourcepub const SYNTAX_OPERATOR_ESC_AZ_BUF_ANCHOR: Self
pub const SYNTAX_OPERATOR_ESC_AZ_BUF_ANCHOR: Self
\A, \Z, \z
Sourcepub const SYNTAX_OPERATOR_ESC_CAPITAL_G_BEGIN_ANCHOR: Self
pub const SYNTAX_OPERATOR_ESC_CAPITAL_G_BEGIN_ANCHOR: Self
\G
Sourcepub const SYNTAX_OPERATOR_DECIMAL_BACKREF: Self
pub const SYNTAX_OPERATOR_DECIMAL_BACKREF: Self
\num
Sourcepub const SYNTAX_OPERATOR_BRACKET_CC: Self
pub const SYNTAX_OPERATOR_BRACKET_CC: Self
[...]
Sourcepub const SYNTAX_OPERATOR_ESC_W_WORD: Self
pub const SYNTAX_OPERATOR_ESC_W_WORD: Self
\w, \W
Sourcepub const SYNTAX_OPERATOR_ESC_LTGT_WORD_BEGIN_END: Self
pub const SYNTAX_OPERATOR_ESC_LTGT_WORD_BEGIN_END: Self
\<. \>
Sourcepub const SYNTAX_OPERATOR_ESC_B_WORD_BOUND: Self
pub const SYNTAX_OPERATOR_ESC_B_WORD_BOUND: Self
\b, \B
Sourcepub const SYNTAX_OPERATOR_ESC_S_WHITE_SPACE: Self
pub const SYNTAX_OPERATOR_ESC_S_WHITE_SPACE: Self
\s, \S
Sourcepub const SYNTAX_OPERATOR_ESC_D_DIGIT: Self
pub const SYNTAX_OPERATOR_ESC_D_DIGIT: Self
\d, \D
Sourcepub const SYNTAX_OPERATOR_LINE_ANCHOR: Self
pub const SYNTAX_OPERATOR_LINE_ANCHOR: Self
^, $
Sourcepub const SYNTAX_OPERATOR_POSIX_BRACKET: Self
pub const SYNTAX_OPERATOR_POSIX_BRACKET: Self
[:xxxx:]
Sourcepub const SYNTAX_OPERATOR_QMARK_NON_GREEDY: Self
pub const SYNTAX_OPERATOR_QMARK_NON_GREEDY: Self
??,*?,+?,{n,m}?
Sourcepub const SYNTAX_OPERATOR_ESC_CONTROL_CHARS: Self
pub const SYNTAX_OPERATOR_ESC_CONTROL_CHARS: Self
\n,\r,\t,\a ...
Sourcepub const SYNTAX_OPERATOR_ESC_C_CONTROL: Self
pub const SYNTAX_OPERATOR_ESC_C_CONTROL: Self
\cx
Sourcepub const SYNTAX_OPERATOR_ESC_OCTAL3: Self
pub const SYNTAX_OPERATOR_ESC_OCTAL3: Self
\OOO
Sourcepub const SYNTAX_OPERATOR_ESC_X_HEX2: Self
pub const SYNTAX_OPERATOR_ESC_X_HEX2: Self
\xHH
Sourcepub const SYNTAX_OPERATOR_ESC_X_BRACE_HEX8: Self
pub const SYNTAX_OPERATOR_ESC_X_BRACE_HEX8: Self
\x{7HHHHHHH}
Sourcepub const SYNTAX_OPERATOR_VARIABLE_META_CHARACTERS: Self
pub const SYNTAX_OPERATOR_VARIABLE_META_CHARACTERS: Self
Variable meta characters
Sourcepub const SYNTAX_OPERATOR_ESC_CAPITAL_Q_QUOTE: Self
pub const SYNTAX_OPERATOR_ESC_CAPITAL_Q_QUOTE: Self
\Q...\E
Sourcepub const SYNTAX_OPERATOR_QMARK_GROUP_EFFECT: Self
pub const SYNTAX_OPERATOR_QMARK_GROUP_EFFECT: Self
(?...)
Sourcepub const SYNTAX_OPERATOR_OPTION_PERL: Self
pub const SYNTAX_OPERATOR_OPTION_PERL: Self
(?imsx),(?-imsx)
Sourcepub const SYNTAX_OPERATOR_OPTION_RUBY: Self
pub const SYNTAX_OPERATOR_OPTION_RUBY: Self
(?imx), (?-imx)
Sourcepub const SYNTAX_OPERATOR_PLUS_POSSESSIVE_REPEAT: Self
pub const SYNTAX_OPERATOR_PLUS_POSSESSIVE_REPEAT: Self
?+,*+,++
Sourcepub const SYNTAX_OPERATOR_PLUS_POSSESSIVE_INTERVAL: Self
pub const SYNTAX_OPERATOR_PLUS_POSSESSIVE_INTERVAL: Self
{n,m}+
Sourcepub const SYNTAX_OPERATOR_CCLASS_SET_OP: Self
pub const SYNTAX_OPERATOR_CCLASS_SET_OP: Self
[...&&..[..]..]
Sourcepub const SYNTAX_OPERATOR_QMARK_LT_NAMED_GROUP: Self
pub const SYNTAX_OPERATOR_QMARK_LT_NAMED_GROUP: Self
(?<name>...)
Sourcepub const SYNTAX_OPERATOR_ESC_K_NAMED_BACKREF: Self
pub const SYNTAX_OPERATOR_ESC_K_NAMED_BACKREF: Self
\k<name>
Sourcepub const SYNTAX_OPERATOR_ESC_G_SUBEXP_CALL: Self
pub const SYNTAX_OPERATOR_ESC_G_SUBEXP_CALL: Self
\g<name>, \g<n>
Sourcepub const SYNTAX_OPERATOR_ATMARK_CAPTURE_HISTORY: Self
pub const SYNTAX_OPERATOR_ATMARK_CAPTURE_HISTORY: Self
(?@..),(?@<x>..)
Sourcepub const SYNTAX_OPERATOR_ESC_CAPITAL_C_BAR_CONTROL: Self
pub const SYNTAX_OPERATOR_ESC_CAPITAL_C_BAR_CONTROL: Self
\C-x
Sourcepub const SYNTAX_OPERATOR_ESC_CAPITAL_M_BAR_META: Self
pub const SYNTAX_OPERATOR_ESC_CAPITAL_M_BAR_META: Self
\M-x
Sourcepub const SYNTAX_OPERATOR_ESC_V_VTAB: Self
pub const SYNTAX_OPERATOR_ESC_V_VTAB: Self
\v as VTAB
Sourcepub const SYNTAX_OPERATOR_ESC_U_HEX4: Self
pub const SYNTAX_OPERATOR_ESC_U_HEX4: Self
\uHHHH
Sourcepub const SYNTAX_OPERATOR_ESC_GNU_BUF_ANCHOR: Self
pub const SYNTAX_OPERATOR_ESC_GNU_BUF_ANCHOR: Self
\
, '`
Sourcepub const SYNTAX_OPERATOR_ESC_P_BRACE_CHAR_PROPERTY: Self
pub const SYNTAX_OPERATOR_ESC_P_BRACE_CHAR_PROPERTY: Self
\p{...}, \P{...}
Sourcepub const SYNTAX_OPERATOR_ESC_P_BRACE_CIRCUMFLEX_NOT: Self
pub const SYNTAX_OPERATOR_ESC_P_BRACE_CIRCUMFLEX_NOT: Self
\p{^..}, \P{^..}
Sourcepub const SYNTAX_OPERATOR_ESC_H_XDIGIT: Self
pub const SYNTAX_OPERATOR_ESC_H_XDIGIT: Self
\h, \H
Sourcepub const SYNTAX_OPERATOR_INEFFECTIVE_ESCAPE: Self
pub const SYNTAX_OPERATOR_INEFFECTIVE_ESCAPE: Self
\
Source§impl SyntaxOperator
impl SyntaxOperator
Sourcepub const fn bits(&self) -> u64
pub const fn bits(&self) -> u64
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u64) -> Option<Self>
pub const fn from_bits(bits: u64) -> Option<Self>
Convert from a bits value.
This method will return None
if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u64) -> Self
pub const fn from_bits_truncate(bits: u64) -> Self
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u64) -> Self
pub const fn from_bits_retain(bits: u64) -> Self
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
Get a flags value with the bits of a flag with the given name set.
This method will return None
if name
is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn remove(&mut self, other: Self)
pub fn remove(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
remove
won’t truncate other
, but the !
operator will.
Sourcepub fn toggle(&mut self, other: Self)
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Call insert
when value
is true
or remove
when value
is false
.
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
The bitwise and (&
) of the bits in two flags values.
Sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
The bitwise or (|
) of the bits in two flags values.
Sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
Sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
The bitwise negation (!
) of the bits in a flags value, truncating the result.
Source§impl SyntaxOperator
impl SyntaxOperator
Sourcepub const fn iter(&self) -> Iter<SyntaxOperator>
pub const fn iter(&self) -> Iter<SyntaxOperator>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<SyntaxOperator>
pub const fn iter_names(&self) -> IterNames<SyntaxOperator>
Yield a set of contained named flags values.
This method is like iter
, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
Source§impl Binary for SyntaxOperator
impl Binary for SyntaxOperator
Source§impl BitAnd for SyntaxOperator
impl BitAnd for SyntaxOperator
Source§impl BitAndAssign for SyntaxOperator
impl BitAndAssign for SyntaxOperator
Source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
The bitwise and (&
) of the bits in two flags values.
Source§impl BitOr for SyntaxOperator
impl BitOr for SyntaxOperator
Source§fn bitor(self, other: SyntaxOperator) -> Self
fn bitor(self, other: SyntaxOperator) -> Self
The bitwise or (|
) of the bits in two flags values.
Source§type Output = SyntaxOperator
type Output = SyntaxOperator
|
operator.Source§impl BitOrAssign for SyntaxOperator
impl BitOrAssign for SyntaxOperator
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
The bitwise or (|
) of the bits in two flags values.
Source§impl BitXor for SyntaxOperator
impl BitXor for SyntaxOperator
Source§impl BitXorAssign for SyntaxOperator
impl BitXorAssign for SyntaxOperator
Source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
Source§impl Clone for SyntaxOperator
impl Clone for SyntaxOperator
Source§fn clone(&self) -> SyntaxOperator
fn clone(&self) -> SyntaxOperator
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SyntaxOperator
impl Debug for SyntaxOperator
Source§impl Extend<SyntaxOperator> for SyntaxOperator
impl Extend<SyntaxOperator> for SyntaxOperator
Source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
The bitwise or (|
) of the bits in each flags value.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl Flags for SyntaxOperator
impl Flags for SyntaxOperator
Source§const FLAGS: &'static [Flag<SyntaxOperator>]
const FLAGS: &'static [Flag<SyntaxOperator>]
Source§fn from_bits_retain(bits: u64) -> SyntaxOperator
fn from_bits_retain(bits: u64) -> SyntaxOperator
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true
if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|
) of the bits in two flags values.Source§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!
). Read moreSource§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^
) of the bits in two flags values.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&
) of the bits in two flags values.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!
). Read moreSource§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^
) of the bits in two flags values.Source§fn complement(self) -> Self
fn complement(self) -> Self
!
) of the bits in a flags value, truncating the result.Source§impl FromIterator<SyntaxOperator> for SyntaxOperator
impl FromIterator<SyntaxOperator> for SyntaxOperator
Source§fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
The bitwise or (|
) of the bits in each flags value.
Source§impl Hash for SyntaxOperator
impl Hash for SyntaxOperator
Source§impl IntoIterator for SyntaxOperator
impl IntoIterator for SyntaxOperator
Source§impl LowerHex for SyntaxOperator
impl LowerHex for SyntaxOperator
Source§impl Not for SyntaxOperator
impl Not for SyntaxOperator
Source§impl Octal for SyntaxOperator
impl Octal for SyntaxOperator
Source§impl Ord for SyntaxOperator
impl Ord for SyntaxOperator
Source§fn cmp(&self, other: &SyntaxOperator) -> Ordering
fn cmp(&self, other: &SyntaxOperator) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for SyntaxOperator
impl PartialEq for SyntaxOperator
Source§impl PartialOrd for SyntaxOperator
impl PartialOrd for SyntaxOperator
Source§impl PublicFlags for SyntaxOperator
impl PublicFlags for SyntaxOperator
Source§impl Sub for SyntaxOperator
impl Sub for SyntaxOperator
Source§fn sub(self, other: Self) -> Self
fn sub(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
Source§type Output = SyntaxOperator
type Output = SyntaxOperator
-
operator.Source§impl SubAssign for SyntaxOperator
impl SubAssign for SyntaxOperator
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.