pub struct ServiceInfo { /* private fields */ }
Expand description
A Closed Caption Service Information block as stored in CDP (SMPTE 334-2).
Implementations§
Source§impl ServiceInfo
impl ServiceInfo
Sourcepub fn parse(data: &[u8]) -> Result<Self, ParserError>
pub fn parse(data: &[u8]) -> Result<Self, ParserError>
Parse a sequence of bytes into a valid Service Descriptor.
Sourcepub fn is_change(&self) -> bool
pub fn is_change(&self) -> bool
This packet is an update to a previously sent Service Information. Can only be true
when is_start is also true
.
Sourcepub fn set_change(&mut self, change: bool)
pub fn set_change(&mut self, change: bool)
Set the change flag in this Service Information. If true, then the start flag will also be set to true.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
This packet concludes a complete set of Service Information.
Sourcepub fn set_complete(&mut self, complete: bool)
pub fn set_complete(&mut self, complete: bool)
Set the complete flag in this Service Information.
Sourcepub fn services(&self) -> &[ServiceEntry]
pub fn services(&self) -> &[ServiceEntry]
The list of services described by this Service Information.
Sourcepub fn clear_services(&mut self)
pub fn clear_services(&mut self)
Remove all services from this Service Information block.
Sourcepub fn add_service(&mut self, service: ServiceEntry) -> Result<(), WriterError>
pub fn add_service(&mut self, service: ServiceEntry) -> Result<(), WriterError>
Add a service to this Service Information block.
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 Service Information to a sequence of bytes.
Sourcepub fn write_into_unchecked(&self, data: &mut [u8]) -> usize
pub fn write_into_unchecked(&self, data: &mut [u8]) -> usize
Write this Service Information into a preallocated sequence of bytes. data
must be at
least byte_len bytes.
Trait Implementations§
Source§impl Clone for ServiceInfo
impl Clone for ServiceInfo
Source§fn clone(&self) -> ServiceInfo
fn clone(&self) -> ServiceInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more