Enum bytes_parser::BytesParserError
source · pub enum BytesParserError {
NotEnoughBytesForTypeError(String),
NotEnoughBytesForStringError(usize),
NotEnoughBytesForSlice(usize),
CursorOutOfBoundError(isize, usize, usize),
StringParseError(Utf8Error),
InvalidU32ForCharError,
}
Expand description
All the errors that BytesParser can potentially produce.
Variants§
NotEnoughBytesForTypeError(String)
Not enough bytes left (i.e. BytesParser::parseable) to parse a scalar type from it.
NotEnoughBytesForStringError(usize)
Not enough bytes left (i.e. BytesParser::parseable) to parse a string of given bytes from it.
NotEnoughBytesForSlice(usize)
Not enough bytes left (i.e. BytesParser::parseable) to cut a slice of given bytes from it.
CursorOutOfBoundError(isize, usize, usize)
Position resulting from moving the cursor to or by a given amount, would place the cursor out-of-bound.
StringParseError(Utf8Error)
Failed to parse a UTF-8 String from the given bytes.
InvalidU32ForCharError
Trait Implementations§
source§impl Debug for BytesParserError
impl Debug for BytesParserError
source§impl Display for BytesParserError
impl Display for BytesParserError
source§impl Error for BytesParserError
impl Error for BytesParserError
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 PartialEq for BytesParserError
impl PartialEq for BytesParserError
source§fn eq(&self, other: &BytesParserError) -> bool
fn eq(&self, other: &BytesParserError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for BytesParserError
impl StructuralPartialEq for BytesParserError
Auto Trait Implementations§
impl Freeze for BytesParserError
impl RefUnwindSafe for BytesParserError
impl Send for BytesParserError
impl Sync for BytesParserError
impl Unpin for BytesParserError
impl UnwindSafe for BytesParserError
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