pub struct PointControl { /* private fields */ }Expand description
The set of flags used to represent the control field of a DacPoint.
Implementations§
Source§impl PointControl
impl PointControl
Sourcepub const CHANGE_RATE: PointControl
pub const CHANGE_RATE: PointControl
Indicates to the DAC to read a new point rate out of the point rate buffer and set it as the current playback rate.
If the buffer is empty, the rate is not changed.
Sourcepub const fn empty() -> PointControl
pub const fn empty() -> PointControl
Returns an empty set of flags
Sourcepub const fn all() -> PointControl
pub const fn all() -> PointControl
Returns the set containing all flags.
Sourcepub fn from_bits(bits: u16) -> Option<PointControl>
pub fn from_bits(bits: u16) -> Option<PointControl>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u16) -> PointControl
pub const fn from_bits_truncate(bits: u16) -> PointControl
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u16) -> PointControl
pub const unsafe fn from_bits_unchecked(bits: u16) -> PointControl
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: PointControl) -> bool
pub const fn intersects(&self, other: PointControl) -> bool
Returns true if there are flags common to both self and other.
Sourcepub const fn contains(&self, other: PointControl) -> bool
pub const fn contains(&self, other: PointControl) -> bool
Returns true all of the flags in other are contained within self.
Sourcepub fn insert(&mut self, other: PointControl)
pub fn insert(&mut self, other: PointControl)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: PointControl)
pub fn remove(&mut self, other: PointControl)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: PointControl)
pub fn toggle(&mut self, other: PointControl)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: PointControl, value: bool)
pub fn set(&mut self, other: PointControl, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
Source§impl Binary for PointControl
impl Binary for PointControl
Source§impl BitAnd for PointControl
impl BitAnd for PointControl
Source§fn bitand(self, other: PointControl) -> PointControl
fn bitand(self, other: PointControl) -> PointControl
Returns the intersection between the two sets of flags.
Source§type Output = PointControl
type Output = PointControl
& operator.Source§impl BitAndAssign for PointControl
impl BitAndAssign for PointControl
Source§fn bitand_assign(&mut self, other: PointControl)
fn bitand_assign(&mut self, other: PointControl)
Disables all flags disabled in the set.
Source§impl BitOr for PointControl
impl BitOr for PointControl
Source§fn bitor(self, other: PointControl) -> PointControl
fn bitor(self, other: PointControl) -> PointControl
Returns the union of the two sets of flags.
Source§type Output = PointControl
type Output = PointControl
| operator.Source§impl BitOrAssign for PointControl
impl BitOrAssign for PointControl
Source§fn bitor_assign(&mut self, other: PointControl)
fn bitor_assign(&mut self, other: PointControl)
Adds the set of flags.
Source§impl BitXor for PointControl
impl BitXor for PointControl
Source§fn bitxor(self, other: PointControl) -> PointControl
fn bitxor(self, other: PointControl) -> PointControl
Returns the left flags, but with all the right flags toggled.
Source§type Output = PointControl
type Output = PointControl
^ operator.Source§impl BitXorAssign for PointControl
impl BitXorAssign for PointControl
Source§fn bitxor_assign(&mut self, other: PointControl)
fn bitxor_assign(&mut self, other: PointControl)
Toggles the set of flags.
Source§impl Clone for PointControl
impl Clone for PointControl
Source§fn clone(&self) -> PointControl
fn clone(&self) -> PointControl
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PointControl
impl Debug for PointControl
Source§impl Extend<PointControl> for PointControl
impl Extend<PointControl> for PointControl
Source§fn extend<T: IntoIterator<Item = PointControl>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = PointControl>>(&mut self, iterator: T)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl FromIterator<PointControl> for PointControl
impl FromIterator<PointControl> for PointControl
Source§fn from_iter<T: IntoIterator<Item = PointControl>>(iterator: T) -> PointControl
fn from_iter<T: IntoIterator<Item = PointControl>>(iterator: T) -> PointControl
Source§impl Hash for PointControl
impl Hash for PointControl
Source§impl LowerHex for PointControl
impl LowerHex for PointControl
Source§impl Not for PointControl
impl Not for PointControl
Source§fn not(self) -> PointControl
fn not(self) -> PointControl
Returns the complement of this set of flags.
Source§type Output = PointControl
type Output = PointControl
! operator.Source§impl Octal for PointControl
impl Octal for PointControl
Source§impl Ord for PointControl
impl Ord for PointControl
Source§fn cmp(&self, other: &PointControl) -> Ordering
fn cmp(&self, other: &PointControl) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for PointControl
impl PartialEq for PointControl
Source§impl PartialOrd for PointControl
impl PartialOrd for PointControl
Source§impl Sub for PointControl
impl Sub for PointControl
Source§fn sub(self, other: PointControl) -> PointControl
fn sub(self, other: PointControl) -> PointControl
Returns the set difference of the two sets of flags.
Source§type Output = PointControl
type Output = PointControl
- operator.Source§impl SubAssign for PointControl
impl SubAssign for PointControl
Source§fn sub_assign(&mut self, other: PointControl)
fn sub_assign(&mut self, other: PointControl)
Disables all flags enabled in the set.