Skip to main content

ContentGenre

Enum ContentGenre 

Source
#[non_exhaustive]
pub enum ContentGenre {
Show 15 variants UndefinedContent, MovieDrama, NewsCurrentAffairs, ShowGameShow, Sports, ChildrenYouth, MusicBalletDance, ArtsCulture, SocialPoliticalEconomics, EducationScienceFactual, LeisureHobbies, SpecialCharacteristics, Adult, Reserved(u8), UserDefined(u8),
}
Expand description

Content genre level-1 broad category — EN 300 468 Table 29.

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

UndefinedContent

0x0 — undefined content.

§

MovieDrama

0x1 — Movie/Drama.

§

NewsCurrentAffairs

0x2 — News/Current Affairs.

§

ShowGameShow

0x3 — Show/Game Show.

§

Sports

0x4 — Sports.

§

ChildrenYouth

0x5 — Children/Youth programmes.

§

MusicBalletDance

0x6 — Music/Ballet/Dance.

§

ArtsCulture

0x7 — Arts/Culture (without music).

§

SocialPoliticalEconomics

0x8 — Social/Political issues/Economics.

§

EducationScienceFactual

0x9 — Education/Science/Factual topics.

§

LeisureHobbies

0xA — Leisure hobbies.

§

SpecialCharacteristics

0xB — Special characteristics.

§

Adult

0xC — Adult.

§

Reserved(u8)

0xD..=0xE — reserved for future use, preserved verbatim.

§

UserDefined(u8)

0xF — user defined, preserved verbatim.

Implementations§

Source§

impl ContentGenre

Source

pub fn from_nibble_1(n1: u8) -> Self

Convert a level-1 nibble to a ContentGenre.

The input must be a 4-bit nibble value (0..=0xF); values outside this range are masked with & 0x0F.

Source

pub fn to_nibble_1(self) -> u8

Returns the level-1 nibble for this genre (inverse of ContentGenre::from_nibble_1).

Source

pub const fn to_u8(self) -> u8

Returns the wire byte for this value (same as the level-1 nibble).

Source

pub fn name(self) -> &'static str

Returns the broad level-1 category name per EN 300 468 Table 29.

Trait Implementations§

Source§

impl Clone for ContentGenre

Source§

fn clone(&self) -> ContentGenre

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ContentGenre

Source§

impl Debug for ContentGenre

Source§

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

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

impl Display for ContentGenre

Source§

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

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

impl Eq for ContentGenre

Source§

impl PartialEq for ContentGenre

Source§

fn eq(&self, other: &ContentGenre) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ContentGenre

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ContentGenre

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

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

Source§

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

Available on crate feature serde only.
Borrow as &dyn Any so the caller can downcast to the concrete type.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

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

Source§

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

Available on crate feature serde only.
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> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

Source§

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

Source§

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

Available on crate feature serde only.
Borrow as &dyn Any so the caller can downcast to the concrete type.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.