Enum cur::Scent[][src]

#[non_exhaustive]
pub enum Scent {
    Char(char),
    Range(charchar),
    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)

Tuple Fields

0: char

Matches the given char.

Range(charchar)

Tuple Fields

0: char
1: char

Matches a single char whose code point is within the inclusive range of the 2 given.

Union(MultipleOdors)

Tuple Fields

Matches any of the given Odors.

Matches are attempted in the given order.

Repetition(Odor)

Tuple Fields

0: 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)

Tuple Fields

0: Odor

Matches the given Odor.

Matches will be marked with the [Name] of the given Odor.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Extends a collection with the contents of an iterator. Read more

🔬 This is a nightly-only experimental API. (extend_one)

Extends a collection with exactly one element.

🔬 This is a nightly-only experimental API. (extend_one)

Reserves capacity in a collection for the given number of additional elements. Read more

Creates a value from an iterator. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.