Enum icu_pattern::ParserError [−][src]
pub enum ParserError<E> where
E: Debug, {
IllegalCharacter(char),
InvalidPlaceholder(E),
UnclosedPlaceholder,
UnclosedQuotedLiteral,
}
Expand description
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 implementsFromStr
.
Variants
IllegalCharacter(char)
Encountered an illegal character.
Tuple Fields of IllegalCharacter
0: char
Placeholder hould not be parsed from the given string slice.
The pattern contains an unclosed placeholder.
The pattern contains an unclosed quoted literal.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.