Trait OutputMode
pub trait OutputMode
Trait Defining the parser's execution
The same parser implementation can vary in behaviour according to the chosen output mode
Associated Types
type Output: Mode;Defines the [Mode] for the output type. [Emit] will generate the value, [Check] will apply the parser but will only generate
()if successful. This can be used when verifying that the input data conforms to the format without having to generate any output datatype Error: Mode;Defines the [Mode] for the output type. [Emit] will generate the value, [Check] will apply the parser but will only generate
()if an error happened. [Emit] should be used when we want to handle the error and extract useful information from it. [Check] is used when we just want to know if parsing failed and reject the data quickly.type Incomplete: IsStreaming;Indicates whether the input data is "complete", ie we already have the entire data in the buffer, or if it is "streaming", where more data can be added later in the buffer. In streaming mode, the parser will understand that a failure may mean that we are missing data, and will return a specific error branch, [Err::Incomplete] to signal it. In complete mode, the parser will generate a normal error
Implementors
impl<M: Mode, EM: Mode, S: IsStreaming> OutputMode for OutputM<M, EM, S>