[][src]Struct php_literal_parser::SpannedError

pub struct SpannedError<'a, T: Error + Debug> { /* fields omitted */ }

An error and related source span, will print out the problematic code fragment and error on Display

Example

. |
2 |     [
3 |         "broken"
4 |         "array"                                                                                         
  |         ^^^^^^^^ Unexpected token, found LiteralString expected one of [SquareClose, Comma, Arrow]
5 |     ]
6 |

Implementations

impl<'a, T: Error + Debug> SpannedError<'a, T>[src]

pub fn new(error: T, span: Span, source: &'a str) -> Self[src]

pub fn error(&self) -> &T[src]

Trait Implementations

impl<'a, T: Debug + Error> Debug for SpannedError<'a, T>[src]

impl<'a, T: Error + Debug> Display for SpannedError<'a, T>[src]

impl<'a, T: Error + Debug + 'static> Error for SpannedError<'a, T>[src]

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for SpannedError<'a, T> where
    T: RefUnwindSafe

impl<'a, T> Send for SpannedError<'a, T> where
    T: Send

impl<'a, T> Sync for SpannedError<'a, T> where
    T: Sync

impl<'a, T> Unpin for SpannedError<'a, T> where
    T: Unpin

impl<'a, T> UnwindSafe for SpannedError<'a, T> where
    T: UnwindSafe

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