pub struct DeviceRef(/* private fields */);
Implementations§
Source§impl DeviceRef
impl DeviceRef
Sourcepub unsafe fn from_ptr<'a>(ptr: *mut cubeb_device) -> &'a DeviceRef
pub unsafe fn from_ptr<'a>(ptr: *mut cubeb_device) -> &'a DeviceRef
§Safety
This function is unsafe because it dereferences the given ptr
pointer.
The caller should ensure that pointer is valid.
Sourcepub unsafe fn from_ptr_mut<'a>(ptr: *mut cubeb_device) -> &'a mut DeviceRef
pub unsafe fn from_ptr_mut<'a>(ptr: *mut cubeb_device) -> &'a mut DeviceRef
§Safety
This function is unsafe because it dereferences the given ptr
pointer.
The caller should ensure that pointer is valid.
pub fn as_ptr(&self) -> *mut cubeb_device
Source§impl DeviceRef
impl DeviceRef
Sourcepub fn output_name(&self) -> Option<&str>
pub fn output_name(&self) -> Option<&str>
Gets the output device name.
May return None
if there is no output device.
pub fn output_name_bytes(&self) -> Option<&[u8]>
Sourcepub fn input_name(&self) -> Option<&str>
pub fn input_name(&self) -> Option<&str>
Gets the input device name.
May return None
if there is no input device.
pub fn input_name_bytes(&self) -> Option<&[u8]>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DeviceRef
impl !RefUnwindSafe for DeviceRef
impl Send for DeviceRef
impl !Sync for DeviceRef
impl Unpin for DeviceRef
impl UnwindSafe for DeviceRef
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
Mutably borrows from an owned value. Read more