pub struct ParseErrorFailure<'a> {
pub input: &'a str,
pub message: String,
}Expand description
A complete parsing failure along with the location the error occurred and the error message.
Fields§
§input: &'a str§message: StringImplementations§
Source§impl<'a> ParseErrorFailure<'a>
impl<'a> ParseErrorFailure<'a>
pub fn new(input: &'a str, message: impl AsRef<str>) -> Self
Sourcepub fn new_for_trailing_input(input: &'a str) -> Self
pub fn new_for_trailing_input(input: &'a str) -> Self
Opinionated helper used to fail for trailing input.
Sourcepub fn into_result<T>(self) -> Result<T, ParseErrorFailureError>
pub fn into_result<T>(self) -> Result<T, ParseErrorFailureError>
Opinionated helper to turn this failure into a result.
Sourcepub fn into_error(self) -> ParseErrorFailureError
pub fn into_error(self) -> ParseErrorFailureError
Opinionated helper to turn this failure into a ParseErrorFailureError.
Trait Implementations§
Source§impl<'a> Clone for ParseErrorFailure<'a>
impl<'a> Clone for ParseErrorFailure<'a>
Source§fn clone(&self) -> ParseErrorFailure<'a>
fn clone(&self) -> ParseErrorFailure<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for ParseErrorFailure<'a>
impl<'a> RefUnwindSafe for ParseErrorFailure<'a>
impl<'a> Send for ParseErrorFailure<'a>
impl<'a> Sync for ParseErrorFailure<'a>
impl<'a> Unpin for ParseErrorFailure<'a>
impl<'a> UnwindSafe for ParseErrorFailure<'a>
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