@@ -27,9 +27,9 @@ pub trait Finish<I, O, E> {
27
27
/// *warning*: if the result is `Err(Err::Incomplete(_))`, this method will panic.
28
28
/// - "complete" parsers: It will not be an issue, `Incomplete` is never used
29
29
/// - "streaming" parsers: `Incomplete` will be returned if there's not enough data
30
- /// for the parser to decide, and you should gather more data before parsing again.
31
- /// Once the parser returns either `Ok(_)`, `Err(Err::Error(_))` or `Err(Err::Failure(_))`,
32
- /// you can get out of the parsing loop and call `finish()` on the parser's result
30
+ /// for the parser to decide, and you should gather more data before parsing again.
31
+ /// Once the parser returns either `Ok(_)`, `Err(Err::Error(_))` or `Err(Err::Failure(_))`,
32
+ /// you can get out of the parsing loop and call `finish()` on the parser's result
33
33
fn finish ( self ) -> Result < ( I , O ) , E > ;
34
34
}
35
35
@@ -83,14 +83,14 @@ impl Needed {
83
83
/// It has three cases:
84
84
///
85
85
/// * `Incomplete` indicates that more data is needed to decide. The `Needed` enum
86
- /// can contain how many additional bytes are necessary. If you are sure your parser
87
- /// is working on full data, you can wrap your parser with the `complete` combinator
88
- /// to transform that case in `Error`
86
+ /// can contain how many additional bytes are necessary. If you are sure your parser
87
+ /// is working on full data, you can wrap your parser with the `complete` combinator
88
+ /// to transform that case in `Error`
89
89
/// * `Error` means some parser did not succeed, but another one might (as an example,
90
- /// when testing different branches of an `alt` combinator)
90
+ /// when testing different branches of an `alt` combinator)
91
91
/// * `Failure` indicates an unrecoverable error. For example, when a prefix has been
92
- /// recognised and the next parser has been confirmed, if that parser fails, then the
93
- /// entire process fails; there are no more parsers to try.
92
+ /// recognised and the next parser has been confirmed, if that parser fails, then the
93
+ /// entire process fails; there are no more parsers to try.
94
94
///
95
95
/// Distinguishing `Failure` this from `Error` is only relevant inside the parser's code. For
96
96
/// external consumers, both mean that parsing failed.
@@ -316,10 +316,10 @@ impl Mode for Check {
316
316
/// Parser result type
317
317
///
318
318
/// * `Ok` branch: a tuple of the remaining input data, and the output value.
319
- /// The output value is of the `O` type if the output mode was [Emit], and `()`
320
- /// if the mode was [Check]
319
+ /// The output value is of the `O` type if the output mode was [Emit], and `()`
320
+ /// if the mode was [Check]
321
321
/// * `Err` branch: an error of the `E` type if the erroor mode was [Emit], and `()`
322
- /// if the mode was [Check]
322
+ /// if the mode was [Check]
323
323
pub type PResult < OM , I , O , E > = Result <
324
324
( I , <<OM as OutputMode >:: Output as Mode >:: Output < O > ) ,
325
325
Err < E , <<OM as OutputMode >:: Error as Mode >:: Output < E > > ,
0 commit comments