#[repr(u32)]pub enum AudioRenderUsage {
Background = 0,
Media = 1,
Interruption = 2,
SystemAgent = 3,
Communication = 4,
}
Expand description
Usage annotating the purpose of the stream being used to render audio. An AudioRenderer’s usage cannot be changed after creation. The AudioRenderUsage is used by audio policy to dictate how audio streams interact with each other.
Variants§
Background = 0
Stream is intended to be used for ambient or background sound. Streams that can be interrupted without consequence should use this.
Media = 1
Stream is intended to be used for normal functionality. Streams that are part of normal functionality should use this.
Interruption = 2
Stream is intended to interrupt any ongoing function of the device. Streams that are used for interruptions like notifications should use this.
SystemAgent = 3
Stream is for interaction with a system agent. This should be used in response to a user initiated trigger.
Communication = 4
Stream is intended to be used for some form of real time user to user communication. Voice/Video chat should use this.
Implementations§
Source§impl AudioRenderUsage
impl AudioRenderUsage
pub fn from_primitive(prim: u32) -> Option<Self>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
is_unknown
Trait Implementations§
Source§impl Clone for AudioRenderUsage
impl Clone for AudioRenderUsage
Source§fn clone(&self) -> AudioRenderUsage
fn clone(&self) -> AudioRenderUsage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AudioRenderUsage
impl Debug for AudioRenderUsage
Source§impl<D: ResourceDialect> Decode<AudioRenderUsage, D> for AudioRenderUsage
impl<D: ResourceDialect> Decode<AudioRenderUsage, D> for AudioRenderUsage
Source§impl<D: ResourceDialect> Encode<AudioRenderUsage, D> for AudioRenderUsage
impl<D: ResourceDialect> Encode<AudioRenderUsage, D> for AudioRenderUsage
Source§impl Hash for AudioRenderUsage
impl Hash for AudioRenderUsage
Source§impl Ord for AudioRenderUsage
impl Ord for AudioRenderUsage
Source§fn cmp(&self, other: &AudioRenderUsage) -> Ordering
fn cmp(&self, other: &AudioRenderUsage) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for AudioRenderUsage
impl PartialEq for AudioRenderUsage
Source§impl PartialOrd for AudioRenderUsage
impl PartialOrd for AudioRenderUsage
Source§impl TypeMarker for AudioRenderUsage
impl TypeMarker for AudioRenderUsage
Source§type Owned = AudioRenderUsage
type Owned = AudioRenderUsage
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
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
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 AudioRenderUsage
impl ValueTypeMarker for AudioRenderUsage
Source§type Borrowed<'a> = AudioRenderUsage
type Borrowed<'a> = AudioRenderUsage
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for AudioRenderUsage
impl Eq for AudioRenderUsage
impl StructuralPartialEq for AudioRenderUsage
Auto Trait Implementations§
impl Freeze for AudioRenderUsage
impl RefUnwindSafe for AudioRenderUsage
impl Send for AudioRenderUsage
impl Sync for AudioRenderUsage
impl Unpin for AudioRenderUsage
impl UnwindSafe for AudioRenderUsage
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
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)
clone_to_uninit
)