Skip to main content

CaError

Enum CaError 

Source
#[non_exhaustive]
pub enum CaError { NoCaDescriptor { program_number: u16, }, Io(Error), Serialize(Error), PmtParse(Error), Cat(Error), NotManaged { program_number: u16, }, }
Expand description

Errors from the managed CAS-layer API (Driver::add_service and friends, #763).

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.
§

NoCaDescriptor

The PMT carries no CA_descriptor (ISO/IEC 13818-1 §2.6.16, tag 0x09) at programme or elementary-stream level — there is nothing for the CAM to descramble, so no ca_pmt is built or sent.

Fields

§program_number: u16

The programme whose PMT carried no CA info.

§

Io(Error)

Sending the built ca_pmt to the device failed.

§

Serialize(Error)

The ca_pmt projected from the caller’s PMT has no valid wire encoding (a program_info_length/ES_info_length or version_number out of its spec range — e.g. a source PMT whose descriptor loop is corrupted past the section end) or its stored raw PMT no longer re-parses. r10-W-20: Driver::add_service and the re-query timer must reject such a PMT as an Err value rather than panic inside the serialization.

§

PmtParse(Error)

The raw PMT bytes stored at add_service time no longer re-parse on a re-query tick (corruption of the caller’s own state); the re-query is reported as an error instead of panicking (r10-W-20). Shares the dvb_si::error::Error payload of the Cat arm.

§

Cat(Error)

The CAT’s descriptor loop (ISO/IEC 13818-1 §2.4.4.7) carried a truncated CA_descriptor (ISO/IEC 13818-1 §2.6.16) — Driver::set_cat could not extract the CAID/EMM-PID map.

§

NotManaged

The programme is not in the slot’s managed CAS-layer service set, so there is nothing to update (EN 50221 §8.4.3.4 Table 25, ca_pmt_list_management = update). Returned by Driver::update_service for an unknown program_number.

Fields

§program_number: u16

The programme that is not currently managed.

Trait Implementations§

Source§

impl Debug for CaError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for CaError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for CaError

Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for CaError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for CaError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for CaError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DescriptorObject for T
where T: Debug + Any + Send + Sync,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Borrow as &dyn Any so the caller can downcast to the concrete type.
Source§

impl<T> ExtensionObject for T
where T: Debug + Any + Send + Sync,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Borrow as &dyn Any so the caller can downcast to the concrete type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> TableObject for T
where T: Debug + Any + Send + Sync,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Borrow as &dyn Any so the caller can downcast to the concrete type.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.