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>
impl<I> Error for BencodeError<I>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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
Auto Trait Implementations§
impl<I> Freeze for BencodeError<I>where
I: Freeze,
impl<I> RefUnwindSafe for BencodeError<I>where
I: RefUnwindSafe,
impl<I> Send for BencodeError<I>where
I: Send,
impl<I> Sync for BencodeError<I>where
I: Sync,
impl<I> Unpin for BencodeError<I>where
I: Unpin,
impl<I> UnwindSafe for BencodeError<I>where
I: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more