#[non_exhaustive]pub enum Error {
BufferTooShort {
need: usize,
have: usize,
what: &'static str,
},
CrcMismatch {
computed: u32,
expected: u32,
},
UnexpectedTableId {
table_id: u8,
},
UnexpectedDescriptorTag {
tag: u8,
what: &'static str,
expected: u8,
},
UnexpectedCommandType {
got: u8,
what: &'static str,
expected: u8,
},
InvalidValue {
field: &'static str,
reason: &'static str,
},
LengthOverflow {
declared: usize,
available: usize,
what: &'static str,
},
OutputBufferTooSmall {
need: usize,
have: usize,
},
}Expand description
Error variants that SCTE 35 parsers and builders can return.
Spec references quote clauses from ANSI/SCTE 35 2023r1 where applicable.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BufferTooShort
Input buffer was shorter than the smallest valid encoding for the type.
Fields
CrcMismatch
CRC-32 validation failed for a splice_info_section (§9.6.1).
Fields
UnexpectedTableId
table_id byte was not the expected 0xFC (§9.6.1).
UnexpectedDescriptorTag
A splice_descriptor_tag byte did not match the value the invoked
descriptor parser expected (§10.2.1).
Fields
UnexpectedCommandType
splice_command_type byte did not match the value the invoked command
parser expected (§9.6.1, Table 7).
Fields
InvalidValue
A field carried a value the structure cannot represent or that violates a spec constraint (e.g. a 33-bit field given a value ≥ 2^33).
LengthOverflow
A declared length (section_length, descriptor_length, …) ran past the bytes available in the buffer.
Fields
OutputBufferTooSmall
Write buffer passed to serialize_into was smaller than serialized_len().
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()