Enum nom_bencode::errors::BencodeError
source · pub enum BencodeError<I> {
Nom(I, ErrorKind),
InvalidInteger(I),
InvalidBytesLength(I),
ParseIntError(I, ParseIntError),
}
Expand description
Parser Errors.
Variants§
Nom(I, ErrorKind)
A error from a nom parser.
InvalidInteger(I)
A integer has an invalid form, e.g -0.
InvalidBytesLength(I)
A byte array length is invalid..
ParseIntError(I, ParseIntError)
A integer could not be parsed correctly.
Trait Implementations§
source§impl<I: Debug> Debug for BencodeError<I>
impl<I: Debug> Debug for BencodeError<I>
source§impl<I> Display for BencodeError<I>where
I: Debug,
impl<I> Display for BencodeError<I>where
I: Debug,
source§impl<I> Error for BencodeError<I>where
Self: Debug + Display,
impl<I> Error for BencodeError<I>where
Self: Debug + Display,
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<I> From<BencodeError<I>> for Err<BencodeError<I>>
impl<I> From<BencodeError<I>> for Err<BencodeError<I>>
source§fn from(value: BencodeError<I>) -> Self
fn from(value: BencodeError<I>) -> Self
Converts to this type from the input type.
source§impl<I> ParseError<I> for BencodeError<I>
impl<I> ParseError<I> for BencodeError<I>
source§fn from_error_kind(input: I, kind: ErrorKind) -> Self
fn from_error_kind(input: I, kind: ErrorKind) -> Self
Creates an error from the input position and an ErrorKind
source§fn append(_: I, _: ErrorKind, other: Self) -> Self
fn append(_: I, _: ErrorKind, other: Self) -> Self
Combines an existing error with a new one created from the input
position and an ErrorKind. This is useful when backtracking
through a parse tree, accumulating error context on the way