pub trait AlwaysTool<'a>: Tool<'a> {
// Required method
fn parse_always(&self, st: View<'a>) -> (Self::Data, usize, View<'a>);
// Provided method
fn parse_always_nodata(&self, st: View<'a>) -> ((), usize, View<'a>) { ... }
}Expand description
A parsing tool that always match a prefix.
Any object implementing this trait must also implement the Tool trait and their
implementation of the parse must be equivalent to
Ok(self.parse_always(st)).
It is a good practice to set core::convert::Infallible (or ! when it will become
stable) as Error, but it is not mandatory.