#[non_exhaustive]pub enum Error {
BufferTooShort {
need: usize,
have: usize,
what: &'static str,
},
InvalidMode {
mode: u8,
},
UnsupportedTsGs {
ts_gs: u8,
},
OutputBufferTooSmall {
need: usize,
have: usize,
},
InvalidIssyForm {
reason: &'static str,
},
DflOutOfRange {
dfl: u16,
max: u16,
},
}Expand description
Error type for BBFrame parsing and serialization.
All variants carry spec-clause references in their display messages.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
BufferTooShort
Input buffer was shorter than the smallest valid encoding.
Fields
InvalidMode
MODE field is neither 0 (NM) nor 1 (HEM).
UnsupportedTsGs
TS/GS input stream type is not supported.
OutputBufferTooSmall
Write buffer passed to serialize_into was smaller than serialized_len().
InvalidIssyForm
ISSY form/prefix bit does not match the decoder called.
DflOutOfRange
DFL field is outside the valid range. The enforced ceiling DFL_MAX_BITS
(64800) is the DVB-S2 normal-FECFRAME data-field bound (EN 302 307-1
§5.1.4); DVB-T2 is tighter still (0..=53760, EN 302 755 Table 2).
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)>
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<TryFromPrimitiveError<Mode>> for Error
impl From<TryFromPrimitiveError<Mode>> for Error
Source§fn from(e: TryFromPrimitiveError<Mode>) -> Self
fn from(e: TryFromPrimitiveError<Mode>) -> Self
Converts to this type from the input type.
Source§impl From<TryFromPrimitiveError<TsGs>> for Error
impl From<TryFromPrimitiveError<TsGs>> for Error
Source§fn from(e: TryFromPrimitiveError<TsGs>) -> Self
fn from(e: TryFromPrimitiveError<TsGs>) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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