#[non_exhaustive]pub enum PatternToken {
Literal(Wtf16String),
AnyOne,
AnyRun,
Alternation(Vec<NamePattern>),
}Expand description
One element of a NamePattern.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Literal(Wtf16String)
A run of literal code units, matched under the clause’s case rule.
AnyOne
Exactly one code point.
AnyRun
Zero or more code points.
Alternation(Vec<NamePattern>)
Any one of several alternative token sequences.
An empty alternation matches nothing, which is a contradiction rather than a vacuous match-all, so it needs no validation.
Trait Implementations§
Source§impl Clone for PatternToken
impl Clone for PatternToken
Source§fn clone(&self) -> PatternToken
fn clone(&self) -> PatternToken
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 PatternToken
impl Debug for PatternToken
impl Eq for PatternToken
Source§impl PartialEq for PatternToken
impl PartialEq for PatternToken
impl StructuralPartialEq for PatternToken
Auto Trait Implementations§
impl Freeze for PatternToken
impl RefUnwindSafe for PatternToken
impl Send for PatternToken
impl Sync for PatternToken
impl Unpin for PatternToken
impl UnsafeUnpin for PatternToken
impl UnwindSafe for PatternToken
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