pub struct JackPortFlags { /* private fields */ }Expand description
A port has a set of flags that are formed by OR-ing together the desired values
from the consts PORT_*. The flags “JackPortIsInput” and “JackPortIsOutput” are
mutually exclusive and it is an error to use them both.
Implementations§
Source§impl JackPortFlags
impl JackPortFlags
Sourcepub fn empty() -> JackPortFlags
pub fn empty() -> JackPortFlags
Returns an empty set of flags.
Sourcepub fn all() -> JackPortFlags
pub fn all() -> JackPortFlags
Returns the set containing all flags.
Sourcepub fn from_bits(bits: c_ulong) -> Option<JackPortFlags>
pub fn from_bits(bits: c_ulong) -> Option<JackPortFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub fn from_bits_truncate(bits: c_ulong) -> JackPortFlags
pub fn from_bits_truncate(bits: c_ulong) -> JackPortFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub fn intersects(&self, other: JackPortFlags) -> bool
pub fn intersects(&self, other: JackPortFlags) -> bool
Returns true if there are flags common to both self and other.
Sourcepub fn contains(&self, other: JackPortFlags) -> bool
pub fn contains(&self, other: JackPortFlags) -> bool
Returns true all of the flags in other are contained within self.
Sourcepub fn insert(&mut self, other: JackPortFlags)
pub fn insert(&mut self, other: JackPortFlags)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: JackPortFlags)
pub fn remove(&mut self, other: JackPortFlags)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: JackPortFlags)
pub fn toggle(&mut self, other: JackPortFlags)
Toggles the specified flags in-place.
Trait Implementations§
Source§impl BitAnd for JackPortFlags
impl BitAnd for JackPortFlags
Source§fn bitand(self, other: JackPortFlags) -> JackPortFlags
fn bitand(self, other: JackPortFlags) -> JackPortFlags
Returns the intersection between the two sets of flags.
Source§type Output = JackPortFlags
type Output = JackPortFlags
& operator.Source§impl BitAndAssign for JackPortFlags
impl BitAndAssign for JackPortFlags
Source§fn bitand_assign(&mut self, other: JackPortFlags)
fn bitand_assign(&mut self, other: JackPortFlags)
Disables all flags disabled in the set.
Source§impl BitOr for JackPortFlags
impl BitOr for JackPortFlags
Source§fn bitor(self, other: JackPortFlags) -> JackPortFlags
fn bitor(self, other: JackPortFlags) -> JackPortFlags
Returns the union of the two sets of flags.
Source§type Output = JackPortFlags
type Output = JackPortFlags
| operator.Source§impl BitOrAssign for JackPortFlags
impl BitOrAssign for JackPortFlags
Source§fn bitor_assign(&mut self, other: JackPortFlags)
fn bitor_assign(&mut self, other: JackPortFlags)
Adds the set of flags.
Source§impl BitXor for JackPortFlags
impl BitXor for JackPortFlags
Source§fn bitxor(self, other: JackPortFlags) -> JackPortFlags
fn bitxor(self, other: JackPortFlags) -> JackPortFlags
Returns the left flags, but with all the right flags toggled.
Source§type Output = JackPortFlags
type Output = JackPortFlags
^ operator.Source§impl BitXorAssign for JackPortFlags
impl BitXorAssign for JackPortFlags
Source§fn bitxor_assign(&mut self, other: JackPortFlags)
fn bitxor_assign(&mut self, other: JackPortFlags)
Toggles the set of flags.
Source§impl Clone for JackPortFlags
impl Clone for JackPortFlags
Source§fn clone(&self) -> JackPortFlags
fn clone(&self) -> JackPortFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for JackPortFlags
impl Debug for JackPortFlags
Source§impl Extend<JackPortFlags> for JackPortFlags
impl Extend<JackPortFlags> for JackPortFlags
Source§fn extend<T: IntoIterator<Item = JackPortFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = JackPortFlags>>(&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<JackPortFlags> for JackPortFlags
impl FromIterator<JackPortFlags> for JackPortFlags
Source§fn from_iter<T: IntoIterator<Item = JackPortFlags>>(
iterator: T,
) -> JackPortFlags
fn from_iter<T: IntoIterator<Item = JackPortFlags>>( iterator: T, ) -> JackPortFlags
Source§impl Hash for JackPortFlags
impl Hash for JackPortFlags
Source§impl Not for JackPortFlags
impl Not for JackPortFlags
Source§fn not(self) -> JackPortFlags
fn not(self) -> JackPortFlags
Returns the complement of this set of flags.
Source§type Output = JackPortFlags
type Output = JackPortFlags
! operator.Source§impl Ord for JackPortFlags
impl Ord for JackPortFlags
Source§fn cmp(&self, other: &JackPortFlags) -> Ordering
fn cmp(&self, other: &JackPortFlags) -> 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 JackPortFlags
impl PartialEq for JackPortFlags
Source§impl PartialOrd for JackPortFlags
impl PartialOrd for JackPortFlags
Source§impl Sub for JackPortFlags
impl Sub for JackPortFlags
Source§fn sub(self, other: JackPortFlags) -> JackPortFlags
fn sub(self, other: JackPortFlags) -> JackPortFlags
Returns the set difference of the two sets of flags.
Source§type Output = JackPortFlags
type Output = JackPortFlags
- operator.Source§impl SubAssign for JackPortFlags
impl SubAssign for JackPortFlags
Source§fn sub_assign(&mut self, other: JackPortFlags)
fn sub_assign(&mut self, other: JackPortFlags)
Disables all flags enabled in the set.