pub enum DeviceTransducerMask {
AllEnabled,
AllDisabled,
Masked(Mask),
}
Available on crate feature
gain
only.Expand description
A mask that represents which Transducers are enabled in a Device.
Variants§
AllEnabled
All transducers are enabled.
AllDisabled
All transducers are disabled.
Masked(Mask)
A filtered mask where each bit represents whether the corresponding transducer is enabled.
Implementations§
Source§impl DeviceTransducerMask
impl DeviceTransducerMask
Sourcepub fn from_fn(dev: &Device, f: impl Fn(&Transducer) -> bool) -> Self
pub fn from_fn(dev: &Device, f: impl Fn(&Transducer) -> bool) -> Self
Creates a DeviceTransducerMask
from an iterator.
Trait Implementations§
Source§impl Clone for DeviceTransducerMask
impl Clone for DeviceTransducerMask
Source§fn clone(&self) -> DeviceTransducerMask
fn clone(&self) -> DeviceTransducerMask
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DeviceTransducerMask
impl Debug for DeviceTransducerMask
Source§impl PartialEq for DeviceTransducerMask
impl PartialEq for DeviceTransducerMask
impl StructuralPartialEq for DeviceTransducerMask
Auto Trait Implementations§
impl Freeze for DeviceTransducerMask
impl RefUnwindSafe for DeviceTransducerMask
impl Send for DeviceTransducerMask
impl Sync for DeviceTransducerMask
impl Unpin for DeviceTransducerMask
impl UnwindSafe for DeviceTransducerMask
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.