#[repr(u32)]pub enum PlayerState {
Idle = 0,
Playing = 1,
Paused = 2,
Buffering = 3,
Error = 4,
}
Expand description
State of a media player.
Variants§
Idle = 0
The initial state of a session if there is no associated media.
Playing = 1
The player is playing.
Paused = 2
The player is paused.
Buffering = 3
The player would be playing, but is temporarily paused for buffering.
Error = 4
The player cannot recover from this state and will close.
Implementations§
Source§impl PlayerState
impl PlayerState
pub fn from_primitive(prim: u32) -> Option<Self>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
👎Deprecated: Strict enums should not use
is_unknown
Trait Implementations§
Source§impl Clone for PlayerState
impl Clone for PlayerState
Source§fn clone(&self) -> PlayerState
fn clone(&self) -> PlayerState
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 moreSource§impl Debug for PlayerState
impl Debug for PlayerState
Source§impl<D: ResourceDialect> Decode<PlayerState, D> for PlayerState
impl<D: ResourceDialect> Decode<PlayerState, D> for PlayerState
Source§impl<D: ResourceDialect> Encode<PlayerState, D> for PlayerState
impl<D: ResourceDialect> Encode<PlayerState, D> for PlayerState
Source§impl Hash for PlayerState
impl Hash for PlayerState
Source§impl Ord for PlayerState
impl Ord for PlayerState
Source§fn cmp(&self, other: &PlayerState) -> Ordering
fn cmp(&self, other: &PlayerState) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PlayerState
impl PartialEq for PlayerState
Source§impl PartialOrd for PlayerState
impl PartialOrd for PlayerState
Source§impl TypeMarker for PlayerState
impl TypeMarker for PlayerState
Source§type Owned = PlayerState
type Owned = PlayerState
The owned Rust type which this FIDL type decodes into.
Source§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.
Source§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
.Source§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 moreSource§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.Source§impl ValueTypeMarker for PlayerState
impl ValueTypeMarker for PlayerState
Source§type Borrowed<'a> = PlayerState
type Borrowed<'a> = PlayerState
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for PlayerState
impl Eq for PlayerState
impl StructuralPartialEq for PlayerState
Auto Trait Implementations§
impl Freeze for PlayerState
impl RefUnwindSafe for PlayerState
impl Send for PlayerState
impl Sync for PlayerState
impl Unpin for PlayerState
impl UnwindSafe for PlayerState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)