#[non_exhaustive]pub enum Scent {
Char(char),
Range(char, char),
Union(MultipleOdors),
Repetition(Odor),
Marked(Odor),
}Expand description
The atomic element of a unicode string pattern.
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.
Char(char)
Matches the given char.
Range(char, char)
Matches a single char whose code point is within the inclusive range of the 2 given.
Union(MultipleOdors)
Matches any of the given Odors.
Matches are attempted in the given order.
Repetition(Odor)
Matches any number of repetitions of the given Odor.
Matches are attempted starting with 0 repetitions (an empty string) and incrementing the number of repetitions by 1 until a match cannot be made.
Marked(Odor)
Trait Implementations§
Source§impl Extend<Scent> for Odor
impl Extend<Scent> for Odor
Source§fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = Scent>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = Scent>,
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl FromIterator<Scent> for Odor
impl FromIterator<Scent> for Odor
impl Eq for Scent
impl StructuralPartialEq for Scent
Auto Trait Implementations§
impl Freeze for Scent
impl RefUnwindSafe for Scent
impl Send for Scent
impl Sync for Scent
impl Unpin for Scent
impl UnwindSafe for Scent
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