pub enum Error<'a> {
OutOfBounds,
InvalidReference(u16),
UnsupportedType(u8),
Nom(&'a [u8], ErrorKind),
PacketTooLarge,
ObjectMissingFromReferenceTable(u64),
IoError(String, ErrorKind),
}Expand description
Enum for representing decoding errors
Variants§
OutOfBounds
Out of bounds decoding
InvalidReference(u16)
Invalid Amf0 reference tag
UnsupportedType(u8)
Invalid type marker
Nom(&'a [u8], ErrorKind)
A nom internal error
PacketTooLarge
Packet is too large (too many headers or messages)
ObjectMissingFromReferenceTable(u64)
Unable to find an object in the reference table
IoError(String, ErrorKind)
An unknown IO error occured
Trait Implementations§
impl<'a> Eq for Error<'a>
Source§impl<'a> Error for Error<'a>
impl<'a> Error for Error<'a>
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<'a, E> FromExternalError<&'a [u8], E> for Error<'a>
impl<'a, E> FromExternalError<&'a [u8], E> for Error<'a>
Source§impl<'a> ParseError<&'a [u8]> for Error<'a>
impl<'a> ParseError<&'a [u8]> for Error<'a>
Source§fn from_error_kind(input: &'a [u8], kind: ErrorKind) -> Self
fn from_error_kind(input: &'a [u8], kind: ErrorKind) -> Self
Creates an error from the input position and an ErrorKind
Source§fn append(_: &[u8], _: ErrorKind, other: Self) -> Self
fn append(_: &[u8], _: 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
impl<'a> StructuralPartialEq for Error<'a>
Auto Trait Implementations§
impl<'a> Freeze for Error<'a>
impl<'a> RefUnwindSafe for Error<'a>
impl<'a> Send for Error<'a>
impl<'a> Sync for Error<'a>
impl<'a> Unpin for Error<'a>
impl<'a> UnsafeUnpin for Error<'a>
impl<'a> UnwindSafe for Error<'a>
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