Enum icu_pattern::ParserError[][src]

pub enum ParserError<E> where
    E: Debug
{ IllegalCharacter(char), InvalidPlaceholder(E), UnclosedPlaceholder, UnclosedQuotedLiteral, }

An error returned when parsing a pattern.

Examples

use icu_pattern::{Parser, ParserOptions, ParserError};

let mut parser = Parser::<usize>::new("{0", ParserOptions {
    allow_raw_letters: false,
});
assert_eq!(Err(ParserError::UnclosedPlaceholder), parser.try_next());

Type parameters

  • E: An error of the replacement type which implements FromStr.

Variants

IllegalCharacter(char)

Encountered an illegal character.

InvalidPlaceholder(E)

Placeholder hould not be parsed from the given string slice.

UnclosedPlaceholder

The pattern contains an unclosed placeholder.

UnclosedQuotedLiteral

The pattern contains an unclosed quoted literal.

Trait Implementations

impl<E: Debug> Debug for ParserError<E> where
    E: Debug
[src]

impl<E> Display for ParserError<E> where
    E: Debug
[src]

impl<E> Error for ParserError<E> where
    E: Debug
[src]

impl<E: PartialEq> PartialEq<ParserError<E>> for ParserError<E> where
    E: Debug
[src]

impl<E> StructuralPartialEq for ParserError<E> where
    E: Debug
[src]

Auto Trait Implementations

impl<E> RefUnwindSafe for ParserError<E> where
    E: RefUnwindSafe

impl<E> Send for ParserError<E> where
    E: Send

impl<E> Sync for ParserError<E> where
    E: Sync

impl<E> Unpin for ParserError<E> where
    E: Unpin

impl<E> UnwindSafe for ParserError<E> where
    E: UnwindSafe

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.