[−][src]Struct witx::ParseError
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 Type
s 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: String
location: Location
Methods
impl ParseError
[src]
Trait Implementations
Auto Trait Implementations
impl Sync for ParseError
impl Send for ParseError
impl Unpin for ParseError
impl UnwindSafe for ParseError
impl RefUnwindSafe for ParseError
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsFail for T where
T: Fail,
[src]
T: Fail,
impl<E> Fail for E where
E: 'static + Error + Send + Sync,
[src]
E: 'static + Error + Send + Sync,