Struct sqa_jack::JackPortFlags
source · 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
sourceimpl 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
sourceimpl BitAnd<JackPortFlags> for JackPortFlags
impl BitAnd<JackPortFlags> for JackPortFlags
sourcefn bitand(self, other: JackPortFlags) -> JackPortFlags
fn bitand(self, other: JackPortFlags) -> JackPortFlags
Returns the intersection between the two sets of flags.
type Output = JackPortFlags
type Output = JackPortFlags
&
operator.sourceimpl BitAndAssign<JackPortFlags> for JackPortFlags
impl BitAndAssign<JackPortFlags> for JackPortFlags
sourcefn bitand_assign(&mut self, other: JackPortFlags)
fn bitand_assign(&mut self, other: JackPortFlags)
Disables all flags disabled in the set.
sourceimpl BitOr<JackPortFlags> for JackPortFlags
impl BitOr<JackPortFlags> for JackPortFlags
sourcefn bitor(self, other: JackPortFlags) -> JackPortFlags
fn bitor(self, other: JackPortFlags) -> JackPortFlags
Returns the union of the two sets of flags.
type Output = JackPortFlags
type Output = JackPortFlags
|
operator.sourceimpl BitOrAssign<JackPortFlags> for JackPortFlags
impl BitOrAssign<JackPortFlags> for JackPortFlags
sourcefn bitor_assign(&mut self, other: JackPortFlags)
fn bitor_assign(&mut self, other: JackPortFlags)
Adds the set of flags.
sourceimpl BitXor<JackPortFlags> for JackPortFlags
impl BitXor<JackPortFlags> for JackPortFlags
sourcefn bitxor(self, other: JackPortFlags) -> JackPortFlags
fn bitxor(self, other: JackPortFlags) -> JackPortFlags
Returns the left flags, but with all the right flags toggled.
type Output = JackPortFlags
type Output = JackPortFlags
^
operator.sourceimpl BitXorAssign<JackPortFlags> for JackPortFlags
impl BitXorAssign<JackPortFlags> for JackPortFlags
sourcefn bitxor_assign(&mut self, other: JackPortFlags)
fn bitxor_assign(&mut self, other: JackPortFlags)
Toggles the set of flags.
sourceimpl Clone for JackPortFlags
impl Clone for JackPortFlags
sourcefn clone(&self) -> JackPortFlags
fn clone(&self) -> JackPortFlags
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for JackPortFlags
impl Debug for JackPortFlags
sourceimpl Extend<JackPortFlags> for JackPortFlags
impl Extend<JackPortFlags> for JackPortFlags
sourcefn extend<T: IntoIterator<Item = JackPortFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = JackPortFlags>>(&mut self, iterator: T)
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)sourceimpl FromIterator<JackPortFlags> for JackPortFlags
impl FromIterator<JackPortFlags> for JackPortFlags
sourcefn from_iter<T: IntoIterator<Item = JackPortFlags>>(
iterator: T
) -> JackPortFlags
fn from_iter<T: IntoIterator<Item = JackPortFlags>>(
iterator: T
) -> JackPortFlags
sourceimpl Hash for JackPortFlags
impl Hash for JackPortFlags
sourceimpl Not for JackPortFlags
impl Not for JackPortFlags
sourcefn not(self) -> JackPortFlags
fn not(self) -> JackPortFlags
Returns the complement of this set of flags.
type Output = JackPortFlags
type Output = JackPortFlags
!
operator.sourceimpl Ord for JackPortFlags
impl Ord for JackPortFlags
sourcefn cmp(&self, other: &JackPortFlags) -> Ordering
fn cmp(&self, other: &JackPortFlags) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
sourceimpl PartialEq<JackPortFlags> for JackPortFlags
impl PartialEq<JackPortFlags> for JackPortFlags
sourcefn eq(&self, other: &JackPortFlags) -> bool
fn eq(&self, other: &JackPortFlags) -> bool
sourceimpl PartialOrd<JackPortFlags> for JackPortFlags
impl PartialOrd<JackPortFlags> for JackPortFlags
sourcefn partial_cmp(&self, other: &JackPortFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &JackPortFlags) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl Sub<JackPortFlags> for JackPortFlags
impl Sub<JackPortFlags> for JackPortFlags
sourcefn sub(self, other: JackPortFlags) -> JackPortFlags
fn sub(self, other: JackPortFlags) -> JackPortFlags
Returns the set difference of the two sets of flags.
type Output = JackPortFlags
type Output = JackPortFlags
-
operator.sourceimpl SubAssign<JackPortFlags> for JackPortFlags
impl SubAssign<JackPortFlags> for JackPortFlags
sourcefn sub_assign(&mut self, other: JackPortFlags)
fn sub_assign(&mut self, other: JackPortFlags)
Disables all flags enabled in the set.