[][src]Struct weldr::error::ParseError

pub struct ParseError {
    pub filename: String,
    pub parse_error: Option<Box<dyn Error>>,
}

Error related to parsing the content of an LDraw file.

Fields

filename: String

Filename of the sub-file reference, generally relative to some canonical catalog path(s).

parse_error: Option<Box<dyn Error>>

Optional underlying error raised by the internal parser.

Implementations

impl ParseError[src]

pub fn new(filename: &str, err: impl Into<Box<dyn Error>>) -> Self[src]

Create a ParseError that stems from an arbitrary error of an underlying parser.

pub fn new_from_nom(filename: &str, err: &Err<(&[u8], ErrorKind)>) -> Self[src]

Create a ParseError that stems from a nom parsing error, capturing the nom::error::ErrorKind from the underlying parser which failed.

Trait Implementations

impl Debug for ParseError[src]

impl From<ParseError> for Error[src]

Auto Trait Implementations

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, 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.