pub struct ServiceEntry { /* private fields */ }
Expand description
An entry for a caption service as specified in ATSC A/65 (2013) 6.9.2 Caption Service Descriptor - Table 6.26
Implementations§
Source§impl ServiceEntry
impl ServiceEntry
Sourcepub fn new(language: [u8; 3], service: FieldOrService) -> Self
pub fn new(language: [u8; 3], service: FieldOrService) -> Self
Construct a new ServiceEntry
.
Sourcepub fn parse(data: [u8; 6]) -> Result<Self, ParserError>
pub fn parse(data: [u8; 6]) -> Result<Self, ParserError>
Parse a Caption Service Descriptor as specified in ATSC A/65.
Sourcepub fn language(&self) -> [u8; 3]
pub fn language(&self) -> [u8; 3]
Language code as specified in ISO 639.2/B encoded in ISO 8859-1 (latin-1).
Sourcepub fn service(&self) -> &FieldOrService
pub fn service(&self) -> &FieldOrService
The CEA-608 field or CEA-708 service referenced by this entry.
Sourcepub fn write<W: Write>(&mut self, w: &mut W) -> Result<(), Error>
pub fn write<W: Write>(&mut self, w: &mut W) -> Result<(), Error>
Write this entry into a byte sequence.
Sourcepub fn write_into_unchecked(&self, data: &mut [u8])
pub fn write_into_unchecked(&self, data: &mut [u8])
Write this entry into a preallocated sequence of bytes. The destination buf
must have
a length of at least 6 bytes.
Trait Implementations§
Source§impl Clone for ServiceEntry
impl Clone for ServiceEntry
Source§fn clone(&self) -> ServiceEntry
fn clone(&self) -> ServiceEntry
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 ServiceEntry
impl Debug for ServiceEntry
Source§impl PartialEq for ServiceEntry
impl PartialEq for ServiceEntry
impl Copy for ServiceEntry
impl Eq for ServiceEntry
impl StructuralPartialEq for ServiceEntry
Auto Trait Implementations§
impl Freeze for ServiceEntry
impl RefUnwindSafe for ServiceEntry
impl Send for ServiceEntry
impl Sync for ServiceEntry
impl Unpin for ServiceEntry
impl UnwindSafe for ServiceEntry
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