Enum language_tags::ValidationError[][src]

pub enum ValidationError {
    DuplicateVariant,
    DuplicateExtension,
    MultipleExtendedLanguageSubtags,
    PrimaryLanguageNotInRegistry,
    ExtendedLanguageNotInRegistry,
    ScriptNotInRegistry,
    RegionNotInRegistry,
    VariantNotInRegistry,
    WrongExtendedLanguagePrefix,
    WrongVariantPrefix,
}

Errors returned by the LanguageTag validation

Variants

DuplicateVariant

The same variant subtag is only allowed once in a tag.

DuplicateExtension

The same extension subtag is only allowed once in a tag before the private use part.

MultipleExtendedLanguageSubtags

only one extended language subtag is allowed

PrimaryLanguageNotInRegistry

The primary language is not in the IANA Language Subtag Registry

ExtendedLanguageNotInRegistry

The extended language is not in the IANA Language Subtag Registry

ScriptNotInRegistry

The script is not in the IANA Language Subtag Registry

RegionNotInRegistry

The region is not in the IANA Language Subtag Registry

VariantNotInRegistry

A variant is not in the IANA Language Subtag Registry

WrongExtendedLanguagePrefix

The primary language is not the expected extended language prefix from the IANA Language Subtag Registry

WrongVariantPrefix

The language tag has not one of the expected variant prefix from the IANA Language Subtag Registry

Trait Implementations

impl Debug for ValidationError[src]

impl Display for ValidationError[src]

impl Eq for ValidationError[src]

impl Error for ValidationError[src]

impl PartialEq<ValidationError> for ValidationError[src]

impl StructuralEq for ValidationError[src]

impl StructuralPartialEq for ValidationError[src]

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> ToString for T where
    T: Display + ?Sized
[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.