[][src]Enum fastobo::error::SyntaxError

pub enum SyntaxError {
    UnexpectedRule {
        expected: Rule,
        actual: Rule,
    },
    ParserError {
        error: PestError<Rule>,
    },
}

A syntax error.

Variants

UnexpectedRule

An unexpected rule was used in FromPair::from_pair.

Example

let pairs = OboParser::parse(Rule::UnquotedString, "hello, world!");
QuotedString::from_pair(pairs.unwrap().next().unwrap()).unwrap_err();

Fields of UnexpectedRule

expected: Ruleactual: Rule
ParserError

The underlying parser encountered an error.

Example

QuotedString::from_str("definitely not a quoted string").unwrap_err();

Fields of ParserError

error: PestError<Rule>

Trait Implementations

impl Eq for SyntaxError[src]

impl PartialEq<SyntaxError> for SyntaxError[src]

impl From<Error<Rule>> for SyntaxError[src]

impl From<SyntaxError> for Error[src]

impl Debug for SyntaxError[src]

impl Display for SyntaxError[src]

impl Error for SyntaxError[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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