#[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<D: ResourceDialect> Decode<AudioCaptureUsage, D> for AudioCaptureUsage
impl<D: ResourceDialect> Decode<AudioCaptureUsage, D> for AudioCaptureUsage
Source§impl<D: ResourceDialect> Encode<AudioCaptureUsage, D> for AudioCaptureUsage
impl<D: ResourceDialect> Encode<AudioCaptureUsage, D> 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§impl PartialOrd for AudioCaptureUsage
impl PartialOrd for AudioCaptureUsage
Source§impl TypeMarker for AudioCaptureUsage
impl TypeMarker for AudioCaptureUsage
Source§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
Source§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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)