Struct cubeb_core::DeviceInfo

source ·
pub struct DeviceInfo(/* private fields */);

Implementations§

Methods from Deref<Target = DeviceInfoRef>§

source

pub fn as_ptr(&self) -> *mut cubeb_device_info

source

pub fn devid(&self) -> DeviceId

Device identifier handle.

source

pub fn device_id(&self) -> Option<&str>

Device identifier which might be presented in a UI.

source

pub fn device_id_bytes(&self) -> Option<&[u8]>

source

pub fn friendly_name(&self) -> Option<&str>

Friendly device name which might be presented in a UI.

source

pub fn friendly_name_bytes(&self) -> Option<&[u8]>

source

pub fn group_id(&self) -> Option<&str>

Two devices have the same group identifier if they belong to the same physical device; for example a headset and microphone.

source

pub fn group_id_bytes(&self) -> Option<&[u8]>

source

pub fn vendor_name(&self) -> Option<&str>

Optional vendor name, may be None.

source

pub fn vendor_name_bytes(&self) -> Option<&[u8]>

source

pub fn device_type(&self) -> DeviceType

Type of device (Input/Output).

source

pub fn state(&self) -> DeviceState

State of device disabled/enabled/unplugged.

source

pub fn preferred(&self) -> DevicePref

Preferred device.

source

pub fn format(&self) -> DeviceFormat

Sample format supported.

source

pub fn default_format(&self) -> DeviceFormat

The default sample format for this device.

source

pub fn max_channels(&self) -> u32

Channels.

source

pub fn default_rate(&self) -> u32

Default/Preferred sample rate.

source

pub fn max_rate(&self) -> u32

Maximum sample rate supported.

source

pub fn min_rate(&self) -> u32

Minimum sample rate supported.

source

pub fn latency_lo(&self) -> u32

Lowest possible latency in frames.

source

pub fn latency_hi(&self) -> u32

Higest possible latency in frames.

Trait Implementations§

source§

impl AsRef<DeviceInfoRef> for DeviceInfo

source§

fn as_ref(&self) -> &DeviceInfoRef

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Borrow<DeviceInfoRef> for DeviceInfo

source§

fn borrow(&self) -> &DeviceInfoRef

Immutably borrows from an owned value. Read more
source§

impl Default for DeviceInfo

source§

fn default() -> DeviceInfo

Returns the “default value” for a type. Read more
source§

impl Deref for DeviceInfo

§

type Target = DeviceInfoRef

The resulting type after dereferencing.
source§

fn deref(&self) -> &DeviceInfoRef

Dereferences the value.
source§

impl DerefMut for DeviceInfo

source§

fn deref_mut(&mut self) -> &mut DeviceInfoRef

Mutably dereferences the value.
source§

impl From<cubeb_device_info> for DeviceInfo

source§

fn from(x: cubeb_device_info) -> DeviceInfo

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.