pub struct DeviceInfoRef(/* private fields */);

Implementations§

source§

impl DeviceInfoRef

source

pub unsafe fn from_ptr<'a>(ptr: *mut cubeb_device_info) -> &'a Self

Safety

This function is unsafe because it dereferences the given ptr pointer. The caller should ensure that pointer is valid.

source

pub unsafe fn from_ptr_mut<'a>(ptr: *mut cubeb_device_info) -> &'a mut Self

Safety

This function is unsafe because it dereferences the given ptr pointer. The caller should ensure that pointer is valid.

source

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

source§

impl DeviceInfoRef

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 Debug for DeviceInfoRef

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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.