Enum ContentType
#[repr(u32)]pub enum ContentType {
Other = 1,
Audio = 2,
Video = 3,
Music = 4,
TvShow = 5,
Movie = 6,
}
Expand description
The type of content playing back, which should be set to the largest applicable value.
Variants§
Other = 1
Content does not qualify for any of the other values.
Audio = 2
Audio-only content that does not qualify as music.
Video = 3
Video-only or audio-video content that does not qualify as a TV show or a movie.
Music = 4
Audio-only content generally recognized as music.
TvShow = 5
Audio-video content that is part of a television or streaming series.
Movie = 6
Audio-video content consisting of a feature film.
Implementations§
§impl ContentType
impl ContentType
pub fn from_primitive(prim: u32) -> Option<ContentType>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
👎Deprecated: Strict enums should not use
is_unknown
Trait Implementations§
§impl Clone for ContentType
impl Clone for ContentType
§fn clone(&self) -> ContentType
fn clone(&self) -> ContentType
Returns a copy 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 more§impl Debug for ContentType
impl Debug for ContentType
§impl<D> Decode<ContentType, D> for ContentTypewhere
D: ResourceDialect,
impl<D> Decode<ContentType, D> for ContentTypewhere
D: ResourceDialect,
§fn new_empty() -> ContentType
fn new_empty() -> ContentType
Creates a valid instance of
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<ContentType, D> for ContentTypewhere
D: ResourceDialect,
impl<D> Encode<ContentType, D> for ContentTypewhere
D: ResourceDialect,
§impl Hash for ContentType
impl Hash for ContentType
§impl Ord for ContentType
impl Ord for ContentType
§impl PartialEq for ContentType
impl PartialEq for ContentType
§impl PartialOrd for ContentType
impl PartialOrd for ContentType
§impl TypeMarker for ContentType
impl TypeMarker for ContentType
§type Owned = ContentType
type Owned = ContentType
The owned Rust type which this FIDL type decodes into.
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for ContentType
impl ValueTypeMarker for ContentType
§type Borrowed<'a> = ContentType
type Borrowed<'a> = ContentType
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<ContentType as TypeMarker>::Owned,
) -> <ContentType as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<ContentType as TypeMarker>::Owned, ) -> <ContentType as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned
to Self::Borrowed
.impl Copy for ContentType
impl Eq for ContentType
impl StructuralPartialEq for ContentType
Auto Trait Implementations§
impl Freeze for ContentType
impl RefUnwindSafe for ContentType
impl Send for ContentType
impl Sync for ContentType
impl Unpin for ContentType
impl UnwindSafe for ContentType
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