Struct monch::ParseErrorFailure
source · 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.