pub struct FrequencyListDescriptor {
pub coding_type: CodingType,
pub centre_frequencies_bcd: Vec<[u8; 4]>,
}Expand description
Frequency List Descriptor.
Fields§
§coding_type: CodingTypeInterpretation of every centre_frequencies_bcd entry.
centre_frequencies_bcd: Vec<[u8; 4]>Raw 4-byte centre_frequency entries in wire order. Interpretation
depends on coding_type: BCD for Satellite/Cable, binary for Terrestrial.
Implementations§
Source§impl FrequencyListDescriptor
impl FrequencyListDescriptor
Sourcepub fn centre_frequencies_hz(&self) -> Vec<Option<u64>>
pub fn centre_frequencies_hz(&self) -> Vec<Option<u64>>
Decode every centre_frequencies_bcd entry to Hz, interpreted per
coding_type. Each element is None if coding_type is Undefined
or a BCD nibble is invalid (Satellite/Cable).
Sourcepub fn set_centre_frequencies_hz(
&mut self,
frequencies_hz: &[u64],
) -> Result<()>
pub fn set_centre_frequencies_hz( &mut self, frequencies_hz: &[u64], ) -> Result<()>
Replace the entries by encoding each Hz value per coding_type
(values truncate to the field’s resolution).
§Errors
ValueOutOfRange if coding_type
is Undefined, a BCD value exceeds 8 digits (Satellite/Cable), or
a binary value exceeds 32 bits (Terrestrial).
Trait Implementations§
Source§impl Clone for FrequencyListDescriptor
impl Clone for FrequencyListDescriptor
Source§fn clone(&self) -> FrequencyListDescriptor
fn clone(&self) -> FrequencyListDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FrequencyListDescriptor
impl Debug for FrequencyListDescriptor
Source§impl<'a> DescriptorDef<'a> for FrequencyListDescriptor
impl<'a> DescriptorDef<'a> for FrequencyListDescriptor
impl Eq for FrequencyListDescriptor
Source§impl<'a> From<FrequencyListDescriptor> for AnyDescriptor<'a>
impl<'a> From<FrequencyListDescriptor> for AnyDescriptor<'a>
Source§fn from(d: FrequencyListDescriptor) -> Self
fn from(d: FrequencyListDescriptor) -> Self
Converts to this type from the input type.
Source§impl<'a> Parse<'a> for FrequencyListDescriptor
impl<'a> Parse<'a> for FrequencyListDescriptor
Source§impl PartialEq for FrequencyListDescriptor
impl PartialEq for FrequencyListDescriptor
Source§fn eq(&self, other: &FrequencyListDescriptor) -> bool
fn eq(&self, other: &FrequencyListDescriptor) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for FrequencyListDescriptor
impl Serialize for FrequencyListDescriptor
Source§impl Serialize for FrequencyListDescriptor
impl Serialize for FrequencyListDescriptor
Source§type Error = Error
type Error = Error
The error type this implementer returns (usually the same as the
corresponding
Parse impl, but need not be).Source§fn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
Number of bytes
serialize_into will write.impl StructuralPartialEq for FrequencyListDescriptor
Auto Trait Implementations§
impl Freeze for FrequencyListDescriptor
impl RefUnwindSafe for FrequencyListDescriptor
impl Send for FrequencyListDescriptor
impl Sync for FrequencyListDescriptor
impl Unpin for FrequencyListDescriptor
impl UnsafeUnpin for FrequencyListDescriptor
impl UnwindSafe for FrequencyListDescriptor
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