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 !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