[][src]Struct witx::ParseError

pub struct ParseError {
    pub message: String,
    pub location: Location,
}

Parser turns s-expressions into unvalidated syntax constructs. conventions: Type::starts_parsing(s-expr) -> bool is for look-ahead: we use this predicate to combine parsers for different Types where both alternatives are accepted. Type::parse(sexpr: &SExpr) -> Result<Self, ParseError> takes a single s-expression and parses it into a Self. for parsers that take a subset of a vector s-expression, the signature Type::parse(sexprs: &[SExpr], location: Location) -> Result<Self, ParseError> has an additional Location argument, which should point to the parent SExpr::Vec. This is used for error reporting in case the slice doesn't have the number of elements expected.

Fields

message: Stringlocation: Location

Methods

impl ParseError[src]

pub fn report_with(&self, witxio: &dyn WitxIo) -> String[src]

pub fn report(&self) -> String[src]

Trait Implementations

impl Debug for ParseError[src]

impl Display for ParseError[src]

impl Fail for ParseError[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]

impl<T> AsFail for T where
    T: Fail
[src]

impl<E> Fail for E where
    E: 'static + Error + Send + Sync
[src]