pub struct StreamProperties {
pub unique_id: Option<[u8; 16]>,
pub is_input: Option<bool>,
pub can_mute: Option<bool>,
pub can_agc: Option<bool>,
pub min_gain_db: Option<f32>,
pub max_gain_db: Option<f32>,
pub gain_step_db: Option<f32>,
pub plug_detect_capabilities: Option<PlugDetectCapabilities>,
pub manufacturer: Option<String>,
pub product: Option<String>,
pub clock_domain: Option<u32>,
/* private fields */
}
Fields§
§unique_id: Option<[u8; 16]>
A unique identifier. If not included, there is no unique id for the StreamConfig.
unique_id
arrays starting with 0x42, 0x54, … (or BT
in ASCII) are
reserved for drivers implementing Bluetooth technologies.
unique_id
arrays starting with 0x55, 0x53, 0x42, … (or USB
in ASCII) are
reserved for drivers implementing USB technologies.
Note that even though the above values map to readable ASCII characters, array
values can span the entire uint8 range (0-255).
Optional.
is_input: Option<bool>
Driver type is input (true) or output (false)
Required.
can_mute: Option<bool>
Gain mute capability. If not included, the StreamConfig can’t mute.
Optional.
can_agc: Option<bool>
Automatic Gain Control (AGC) capability. If not included, the StreamConfig can’t AGC.
Optional.
min_gain_db: Option<f32>
Minimum gain in decibels.
Required.
max_gain_db: Option<f32>
Maximum gain in decibels.
Required.
gain_step_db: Option<f32>
Gain step in decibels, this value must not be negative, but may be zero to convey an
effectively continuous range of values. Must not exceed max_gain_db
- min_gain_db
.
Required.
plug_detect_capabilities: Option<PlugDetectCapabilities>
Plug Detect Capabilities.
Required.
manufacturer: Option<String>
UI string for the manufacturer name. If not included, the manufacturer is unspecified. If included, this string must be non-empty.
Optional.
product: Option<String>
UI string for the product name. If not included, the product name is unspecified. If included, this string must be non-empty.
Optional.
clock_domain: Option<u32>
An identifier for the clock domain in which this hardware operates. If two hardware devices have the same clock domain, their clock rates are identical and perfectly synchronized. Although these two clocks have the same rate, the clock positions may be offset from each other by an arbitrary (but fixed) amount. The clock_domain typically comes from a system wide entity, such as a platform bus or global clock tree.
There are two special values:
-
CLOCK_DOMAIN_MONOTONIC
means the hardware is operating at the same rate as the system montonic clock. -
CLOCK_DOMAIN_EXTERNAL
means the hardware is operating at an unknown rate and is not synchronized with any known clock, not even with other clocks in domainCLOCK_DOMAIN_EXTERNAL
.
If the domain is not CLOCK_DOMAIN_MONOTONIC
, client must use position
notification updates to recover the hardware’s clock.
Required.
Trait Implementations§
Source§impl Clone for StreamProperties
impl Clone for StreamProperties
Source§fn clone(&self) -> StreamProperties
fn clone(&self) -> StreamProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for StreamProperties
impl Debug for StreamProperties
Source§impl<D: ResourceDialect> Decode<StreamProperties, D> for StreamProperties
impl<D: ResourceDialect> Decode<StreamProperties, D> for StreamProperties
Source§impl Default for StreamProperties
impl Default for StreamProperties
Source§fn default() -> StreamProperties
fn default() -> StreamProperties
Source§impl<D: ResourceDialect> Encode<StreamProperties, D> for &StreamProperties
impl<D: ResourceDialect> Encode<StreamProperties, D> for &StreamProperties
Source§impl PartialEq for StreamProperties
impl PartialEq for StreamProperties
Source§impl TypeMarker for StreamProperties
impl TypeMarker for StreamProperties
Source§type Owned = StreamProperties
type Owned = StreamProperties
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
.§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 more§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 StreamProperties
impl ValueTypeMarker for StreamProperties
Source§type Borrowed<'a> = &'a StreamProperties
type Borrowed<'a> = &'a StreamProperties
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Persistable for StreamProperties
impl StructuralPartialEq for StreamProperties
Auto Trait Implementations§
impl Freeze for StreamProperties
impl RefUnwindSafe for StreamProperties
impl Send for StreamProperties
impl Sync for StreamProperties
impl Unpin for StreamProperties
impl UnwindSafe for StreamProperties
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
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
)