#[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<AudioRenderUsage>
pub const fn into_primitive(self) -> u32
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> Decode<AudioRenderUsage, D> for AudioRenderUsagewhere
    D: ResourceDialect,
 
impl<D> Decode<AudioRenderUsage, D> for AudioRenderUsagewhere
    D: ResourceDialect,
Source§fn new_empty() -> AudioRenderUsage
 
fn new_empty() -> AudioRenderUsage
Self. The specific value does not matter,
since it will be overwritten by decode.Source§impl<D> Encode<AudioRenderUsage, D> for AudioRenderUsagewhere
    D: ResourceDialect,
 
impl<D> Encode<AudioRenderUsage, D> for AudioRenderUsagewhere
    D: ResourceDialect,
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 moreSource§fn borrow(
    value: &<AudioRenderUsage as TypeMarker>::Owned,
) -> <AudioRenderUsage as ValueTypeMarker>::Borrowed<'_>
 
fn borrow( value: &<AudioRenderUsage as TypeMarker>::Owned, ) -> <AudioRenderUsage as ValueTypeMarker>::Borrowed<'_>
&Self::Owned to Self::Borrowed.