pub struct ParseError<C: ParseContext> {
pub message: String,
pub context: C,
pub backtrace: Vec<FileLocation>,
}Fields§
§message: String§context: C§backtrace: Vec<FileLocation>Implementations§
Source§impl<C: ParseContext> ParseError<C>
impl<C: ParseContext> ParseError<C>
pub fn to_string_showing_location(&self, show_backtrace: bool) -> String
Sourcepub fn show_backtrace(&self, out: &mut String)
pub fn show_backtrace(&self, out: &mut String)
‘Backtrace’ with the leaf location at the top, one location per line, indented by a tab, starting with a newline.
Sourcepub fn message_append(self, s: &str) -> Self
pub fn message_append(self, s: &str) -> Self
Append s to the message in self (functionally).
Trait Implementations§
Source§impl<C: Debug + ParseContext> Debug for ParseError<C>
impl<C: Debug + ParseContext> Debug for ParseError<C>
Source§impl<'t, B: Backing> From<Box<Expected<'t, B>>> for ParseError<StringParseContext<&'t B>>
impl<'t, B: Backing> From<Box<Expected<'t, B>>> for ParseError<StringParseContext<&'t B>>
Source§impl<'t, B: Backing> From<Box<ExpectedString<'t, B>>> for ParseError<StringParseContext<&'t B>>
impl<'t, B: Backing> From<Box<ExpectedString<'t, B>>> for ParseError<StringParseContext<&'t B>>
Source§fn from(e: Box<ExpectedString<'t, B>>) -> Self
fn from(e: Box<ExpectedString<'t, B>>) -> Self
Converts to this type from the input type.
Source§impl<'t, B: Backing> IntoOwningBacking<<B as ToOwned>::Owned> for ParseError<StringParseContext<&'t B>>
impl<'t, B: Backing> IntoOwningBacking<<B as ToOwned>::Owned> for ParseError<StringParseContext<&'t B>>
type Owning = ParseError<StringParseContext<<B as ToOwned>::Owned>>
fn into_owning_backing(self) -> Self::Owning
Source§impl<C: ParseContext> PartialEq for ParseError<C>
Only the message and context are compared (this is to allow for
tests without breaking due to backtrace changes; backtrace should be
just debugging information)
impl<C: ParseContext> PartialEq for ParseError<C>
Only the message and context are compared (this is to allow for tests without breaking due to backtrace changes; backtrace should be just debugging information)
Auto Trait Implementations§
impl<C> Freeze for ParseError<C>where
C: Freeze,
impl<C> RefUnwindSafe for ParseError<C>where
C: RefUnwindSafe,
impl<C> Send for ParseError<C>where
C: Send,
impl<C> Sync for ParseError<C>where
C: Sync,
impl<C> Unpin for ParseError<C>where
C: Unpin,
impl<C> UnwindSafe for ParseError<C>where
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more