pub struct NotesFlags { /* private fields */ }Expand description
Notes parameters flags.
Implementations§
Source§impl NotesFlags
impl NotesFlags
Sourcepub const EMPTY_FIRST: NotesFlags
pub const EMPTY_FIRST: NotesFlags
Delete everything currently on the piano roll before adding the notes.
Sourcepub const USE_SELECTION: NotesFlags
pub const USE_SELECTION: NotesFlags
Put the new notes in the piano roll selection, if there is one.
Sourcepub const fn empty() -> NotesFlags
pub const fn empty() -> NotesFlags
Returns an empty set of flags
Sourcepub const fn all() -> NotesFlags
pub const fn all() -> NotesFlags
Returns the set containing all flags.
Sourcepub fn from_bits(bits: isize) -> Option<NotesFlags>
pub fn from_bits(bits: isize) -> Option<NotesFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: isize) -> NotesFlags
pub const fn from_bits_truncate(bits: isize) -> NotesFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: isize) -> NotesFlags
pub const unsafe fn from_bits_unchecked(bits: isize) -> NotesFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: NotesFlags) -> bool
pub const fn intersects(&self, other: NotesFlags) -> bool
Returns true if there are flags common to both self and other.
Sourcepub const fn contains(&self, other: NotesFlags) -> bool
pub const fn contains(&self, other: NotesFlags) -> bool
Returns true all of the flags in other are contained within self.
Sourcepub fn insert(&mut self, other: NotesFlags)
pub fn insert(&mut self, other: NotesFlags)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: NotesFlags)
pub fn remove(&mut self, other: NotesFlags)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: NotesFlags)
pub fn toggle(&mut self, other: NotesFlags)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: NotesFlags, value: bool)
pub fn set(&mut self, other: NotesFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
Source§impl Binary for NotesFlags
impl Binary for NotesFlags
Source§impl BitAnd for NotesFlags
impl BitAnd for NotesFlags
Source§fn bitand(self, other: NotesFlags) -> NotesFlags
fn bitand(self, other: NotesFlags) -> NotesFlags
Returns the intersection between the two sets of flags.
Source§type Output = NotesFlags
type Output = NotesFlags
& operator.Source§impl BitAndAssign for NotesFlags
impl BitAndAssign for NotesFlags
Source§fn bitand_assign(&mut self, other: NotesFlags)
fn bitand_assign(&mut self, other: NotesFlags)
Disables all flags disabled in the set.
Source§impl BitOr for NotesFlags
impl BitOr for NotesFlags
Source§fn bitor(self, other: NotesFlags) -> NotesFlags
fn bitor(self, other: NotesFlags) -> NotesFlags
Returns the union of the two sets of flags.
Source§type Output = NotesFlags
type Output = NotesFlags
| operator.Source§impl BitOrAssign for NotesFlags
impl BitOrAssign for NotesFlags
Source§fn bitor_assign(&mut self, other: NotesFlags)
fn bitor_assign(&mut self, other: NotesFlags)
Adds the set of flags.
Source§impl BitXor for NotesFlags
impl BitXor for NotesFlags
Source§fn bitxor(self, other: NotesFlags) -> NotesFlags
fn bitxor(self, other: NotesFlags) -> NotesFlags
Returns the left flags, but with all the right flags toggled.
Source§type Output = NotesFlags
type Output = NotesFlags
^ operator.Source§impl BitXorAssign for NotesFlags
impl BitXorAssign for NotesFlags
Source§fn bitxor_assign(&mut self, other: NotesFlags)
fn bitxor_assign(&mut self, other: NotesFlags)
Toggles the set of flags.
Source§impl Clone for NotesFlags
impl Clone for NotesFlags
Source§fn clone(&self) -> NotesFlags
fn clone(&self) -> NotesFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NotesFlags
impl Debug for NotesFlags
Source§impl Extend<NotesFlags> for NotesFlags
impl Extend<NotesFlags> for NotesFlags
Source§fn extend<T: IntoIterator<Item = NotesFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = NotesFlags>>(&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<NotesFlags> for NotesFlags
impl FromIterator<NotesFlags> for NotesFlags
Source§fn from_iter<T: IntoIterator<Item = NotesFlags>>(iterator: T) -> NotesFlags
fn from_iter<T: IntoIterator<Item = NotesFlags>>(iterator: T) -> NotesFlags
Source§impl Hash for NotesFlags
impl Hash for NotesFlags
Source§impl LowerHex for NotesFlags
impl LowerHex for NotesFlags
Source§impl Not for NotesFlags
impl Not for NotesFlags
Source§fn not(self) -> NotesFlags
fn not(self) -> NotesFlags
Returns the complement of this set of flags.
Source§type Output = NotesFlags
type Output = NotesFlags
! operator.Source§impl Octal for NotesFlags
impl Octal for NotesFlags
Source§impl Ord for NotesFlags
impl Ord for NotesFlags
Source§fn cmp(&self, other: &NotesFlags) -> Ordering
fn cmp(&self, other: &NotesFlags) -> 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 NotesFlags
impl PartialEq for NotesFlags
Source§impl PartialOrd for NotesFlags
impl PartialOrd for NotesFlags
Source§impl Sub for NotesFlags
impl Sub for NotesFlags
Source§fn sub(self, other: NotesFlags) -> NotesFlags
fn sub(self, other: NotesFlags) -> NotesFlags
Returns the set difference of the two sets of flags.
Source§type Output = NotesFlags
type Output = NotesFlags
- operator.Source§impl SubAssign for NotesFlags
impl SubAssign for NotesFlags
Source§fn sub_assign(&mut self, other: NotesFlags)
fn sub_assign(&mut self, other: NotesFlags)
Disables all flags enabled in the set.