Enum yapg::CharsetName[][src]

pub enum CharsetName {
    AlphaLower,
    AlphaUpper,
    Numeric,
    Mathops,
    Prose,
    Delim,
    MiscSpecial,
    Alpha,
    Special,
}

Translation layer between chars (e.g. for cli flags) and the actual character sets.

Especially, you can do CharsetName::from::<char>(c). Translations are:

CharsetNameassociated charcontained chars
AlphaLower'L'matching regex [a-z]
AlphaUpper'U'matching regex [A-Z]
Numeric'N'matching regex [0-9]
Mathops'M'+, -, *, /, =, <, >
Prose'P'., ,, :, ;, !, ?, ', ",
Delim'D'(, ), {, }, [, ]
MiscSpecial'X'#, @, $, %, &, `

For convenience, there are also some charsets built from the “atomic” charsets shown above:

CharsetNameassociated charContained Charsets
Alpha'A'AlphaLower, AlphaUpper
Special'S'Mathops, Punct, Delim, Quote, Blank, MiscSpecial

Variants

AlphaLower
AlphaUpper
Numeric
Mathops
Prose
Delim
MiscSpecial
Alpha
Special

Trait Implementations

impl AddAssign<CharsetName> for CharsetSpec[src]

impl Debug for CharsetName[src]

impl PartialEq<CharsetName> for CharsetName[src]

impl StructuralPartialEq for CharsetName[src]

impl SubAssign<CharsetName> for CharsetSpec[src]

impl TryFrom<char> for CharsetName[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.