pub struct ContentEntry {
pub nibble_1: u8,
pub nibble_2: u8,
pub user_byte: u8,
}Expand description
One content classification entry.
Fields§
§nibble_1: u8content_nibble_level_1 (4 bits) — broad genre (ETSI Table 29).
nibble_2: u8content_nibble_level_2 (4 bits) — sub-genre.
user_byte: u8Broadcaster-specific user byte.
Implementations§
Source§impl ContentEntry
impl ContentEntry
Sourcepub fn genre(&self) -> ContentGenre
pub fn genre(&self) -> ContentGenre
Level-1 broad category per EN 300 468 Table 29.
Sourcepub fn genre_name(&self) -> &'static str
pub fn genre_name(&self) -> &'static str
Most specific genre name per EN 300 468 Table 29.
§Examples
use dvb_si::descriptors::content::ContentEntry;
let e = ContentEntry { nibble_1: 0x1, nibble_2: 0x4, user_byte: 0 };
assert_eq!(e.genre_name(), "comedy");Trait Implementations§
Source§impl Clone for ContentEntry
impl Clone for ContentEntry
Source§fn clone(&self) -> ContentEntry
fn clone(&self) -> ContentEntry
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 moreimpl Copy for ContentEntry
Source§impl Debug for ContentEntry
impl Debug for ContentEntry
impl Eq for ContentEntry
Source§impl PartialEq for ContentEntry
impl PartialEq for ContentEntry
Source§fn eq(&self, other: &ContentEntry) -> bool
fn eq(&self, other: &ContentEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ContentEntry
impl Serialize for ContentEntry
impl StructuralPartialEq for ContentEntry
Auto Trait Implementations§
impl Freeze for ContentEntry
impl RefUnwindSafe for ContentEntry
impl Send for ContentEntry
impl Sync for ContentEntry
impl Unpin for ContentEntry
impl UnsafeUnpin for ContentEntry
impl UnwindSafe for ContentEntry
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