Skip to content

Commit

Permalink
Merge pull request #733 from epage/docs
Browse files Browse the repository at this point in the history
docs(error): Clarify ErrMode
  • Loading branch information
epage authored Jan 31, 2025
2 parents 0f81c4d + ca12391 commit a46329b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ impl Needed {
}

/// Add parse error state to [`ParserError`]s
///
/// Needed for
/// - [`Partial`][crate::stream::Partial] to track whether the [`Stream`] is [`ErrMode::Incomplete`].
/// See also [`_topic/partial`]
/// - Marking errors as unrecoverable ([`ErrMode::Cut`]) and not retrying alternative parsers.
/// See also [`_tutorial/chapter_7#error-cuts`]
#[derive(Debug, Clone, PartialEq)]
pub enum ErrMode<E> {
/// There was not enough data to determine the appropriate action
Expand Down

0 comments on commit a46329b

Please sign in to comment.