pub enum ParserError {
LengthMismatch {
expected: usize,
actual: usize,
},
WrongMagic,
UnknownFramerate,
InvalidFixedBits,
Cea608AfterCea708,
ChecksumFailed,
SequenceCountMismatch,
ServiceNumberMismatch,
InvalidServiceNumber,
ServiceFlagsMismatched,
}
Expand description
Various possible errors when parsing data
Variants§
LengthMismatch
The length of the data does not match the length in the data
WrongMagic
Some magic byte/s do not have the correct value
UnknownFramerate
Unrecognied framerate value
InvalidFixedBits
Some ‘fixed’ bits did not have the correct value
Cea608AfterCea708
CEA-608 bytes were found after CEA-708 bytes
ChecksumFailed
Failed to validate the checksum
SequenceCountMismatch
Sequence count differs between the header and the footer. Usually indicates this packet was spliced together incorrectly.
ServiceNumberMismatch
The service information contains conflicting service numbers.
InvalidServiceNumber
The service number is not valid.
ServiceFlagsMismatched
The service descriptor contains a different set of flags to the CDP.
Trait Implementations§
Source§impl Clone for ParserError
impl Clone for ParserError
Source§fn clone(&self) -> ParserError
fn clone(&self) -> ParserError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ParserError
impl Debug for ParserError
Source§impl Display for ParserError
impl Display for ParserError
Source§impl Error for ParserError
impl Error for ParserError
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 From<ParserError> for ParserError
impl From<ParserError> for ParserError
Source§fn from(value: ParserError) -> Self
fn from(value: ParserError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ParserError
impl PartialEq for ParserError
impl Copy for ParserError
impl Eq for ParserError
impl StructuralPartialEq for ParserError
Auto Trait Implementations§
impl Freeze for ParserError
impl RefUnwindSafe for ParserError
impl Send for ParserError
impl Sync for ParserError
impl Unpin for ParserError
impl UnwindSafe for ParserError
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