#[repr(u32)]pub enum AudioCaptureUsage {
Background = 0,
Foreground = 1,
SystemAgent = 2,
Communication = 3,
}
Expand description
Usages annotating the purpose of the stream being used to capture audio. The AudioCaptureUsage is used by audio policy to dictate how audio streams interact with each other.
Variants§
Background = 0
Stream is used to capture audio while in the background. These streams may be active at any the time and are considered privileged. Example: Listening for Hotwords
Foreground = 1
Stream is intended to be used for normal capture functionality. Streams that are used for audio capture while the stream creator is in the foreground should use this. Example: Voice Recorder
SystemAgent = 2
Stream is for interaction with a system agent. This should only be used once a user has signalled their intent to have the interaction with an interested party. Examples: Assistant, Siri, Alexa
Communication = 3
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 AudioCaptureUsage
impl AudioCaptureUsage
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 AudioCaptureUsage
impl Clone for AudioCaptureUsage
source§fn clone(&self) -> AudioCaptureUsage
fn clone(&self) -> AudioCaptureUsage
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AudioCaptureUsage
impl Debug for AudioCaptureUsage
source§impl Decode<AudioCaptureUsage> for AudioCaptureUsage
impl Decode<AudioCaptureUsage> for AudioCaptureUsage
source§impl Encode<AudioCaptureUsage> for AudioCaptureUsage
impl Encode<AudioCaptureUsage> for AudioCaptureUsage
source§impl Hash for AudioCaptureUsage
impl Hash for AudioCaptureUsage
source§impl Ord for AudioCaptureUsage
impl Ord for AudioCaptureUsage
source§fn cmp(&self, other: &AudioCaptureUsage) -> Ordering
fn cmp(&self, other: &AudioCaptureUsage) -> 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 AudioCaptureUsage
impl PartialEq for AudioCaptureUsage
source§fn eq(&self, other: &AudioCaptureUsage) -> bool
fn eq(&self, other: &AudioCaptureUsage) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for AudioCaptureUsage
impl PartialOrd for AudioCaptureUsage
source§fn partial_cmp(&self, other: &AudioCaptureUsage) -> Option<Ordering>
fn partial_cmp(&self, other: &AudioCaptureUsage) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TypeMarker for AudioCaptureUsage
impl TypeMarker for AudioCaptureUsage
§type Owned = AudioCaptureUsage
type Owned = AudioCaptureUsage
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 AudioCaptureUsage
impl ValueTypeMarker for AudioCaptureUsage
§type Borrowed<'a> = AudioCaptureUsage
type Borrowed<'a> = AudioCaptureUsage
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for AudioCaptureUsage
impl Eq for AudioCaptureUsage
impl StructuralPartialEq for AudioCaptureUsage
Auto Trait Implementations§
impl Freeze for AudioCaptureUsage
impl RefUnwindSafe for AudioCaptureUsage
impl Send for AudioCaptureUsage
impl Sync for AudioCaptureUsage
impl Unpin for AudioCaptureUsage
impl UnwindSafe for AudioCaptureUsage
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)