Parse is a trait that defines how to go from a Buffer to a value. It is defined as the following
#![allow(unused)]fnmain() {
pubtraitParse<T>: Sized {
fnparse(input: &mutimpl Buffer<T>) -> eyre::Result<Self>;
// Covered in the next sectionfnpeek(input: &mutimpl Buffer<T>) -> bool {
Self::parse(input).is_ok()
}
}
}
Parse isn't much on it's own, but it's the basis around the rest of this crate. We piggy-back off of eyre for error handling, as parsers may have several nested levels of errors and handling those with specific error types can get very complicated.