pub struct ParamFlags(/* private fields */);Expand description
Flags for controlling a parameter’s behavior.
Implementations§
Source§impl ParamFlags
impl ParamFlags
Sourcepub const BYPASS: ParamFlags
pub const BYPASS: ParamFlags
When applied to a BoolParam, this will cause the parameter to be linked to the
host’s bypass control. Only a single parameter can be marked as a bypass parameter. If
you don’t have a bypass parameter, then nice-plug will add one for you. You will need to
implement this yourself if your plugin introduces latency.
Sourcepub const NON_AUTOMATABLE: ParamFlags
pub const NON_AUTOMATABLE: ParamFlags
The parameter cannot be changed from an automation lane. The parameter can however still be manually changed by the user from either the plugin’s own GUI or from the host’s generic UI.
Sourcepub const HIDDEN: ParamFlags
pub const HIDDEN: ParamFlags
Hides the parameter in the host’s generic UI for this plugin. This also implies
NON_AUTOMATABLE. Setting this does not prevent you from changing the parameter in the
plugin’s editor GUI.
Sourcepub const HIDE_IN_GENERIC_UI: ParamFlags
pub const HIDE_IN_GENERIC_UI: ParamFlags
Don’t show this parameter when generating a generic UI for the plugin using one of nice-plug’s generic UI widgets.
Source§impl ParamFlags
impl ParamFlags
Sourcepub const fn empty() -> ParamFlags
pub const fn empty() -> ParamFlags
Get a flags value with all bits unset.
Sourcepub const fn all() -> ParamFlags
pub const fn all() -> ParamFlags
Get a flags value with all known bits set.
Sourcepub const fn bits(&self) -> u32
pub const fn bits(&self) -> u32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u32) -> Option<ParamFlags>
pub const fn from_bits(bits: u32) -> Option<ParamFlags>
Convert from a bits value.
This method will return None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u32) -> ParamFlags
pub const fn from_bits_truncate(bits: u32) -> ParamFlags
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u32) -> ParamFlags
pub const fn from_bits_retain(bits: u32) -> ParamFlags
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<ParamFlags>
pub fn from_name(name: &str) -> Option<ParamFlags>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: ParamFlags) -> bool
pub const fn intersects(&self, other: ParamFlags) -> bool
Whether any set bits in other are also set in self.
Sourcepub const fn contains(&self, other: ParamFlags) -> bool
pub const fn contains(&self, other: ParamFlags) -> bool
Whether all set bits in other are also set in self.
Sourcepub fn insert(&mut self, other: ParamFlags)
pub fn insert(&mut self, other: ParamFlags)
The bitwise or (|) of the bits in self and other.
Sourcepub fn remove(&mut self, other: ParamFlags)
pub fn remove(&mut self, other: ParamFlags)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
Sourcepub fn toggle(&mut self, other: ParamFlags)
pub fn toggle(&mut self, other: ParamFlags)
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub fn set(&mut self, other: ParamFlags, value: bool)
pub fn set(&mut self, other: ParamFlags, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: ParamFlags) -> ParamFlags
pub const fn intersection(self, other: ParamFlags) -> ParamFlags
The bitwise and (&) of the bits in self and other.
Sourcepub const fn union(self, other: ParamFlags) -> ParamFlags
pub const fn union(self, other: ParamFlags) -> ParamFlags
The bitwise or (|) of the bits in self and other.
Sourcepub const fn difference(self, other: ParamFlags) -> ParamFlags
pub const fn difference(self, other: ParamFlags) -> ParamFlags
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Sourcepub const fn symmetric_difference(self, other: ParamFlags) -> ParamFlags
pub const fn symmetric_difference(self, other: ParamFlags) -> ParamFlags
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub const fn complement(self) -> ParamFlags
pub const fn complement(self) -> ParamFlags
The bitwise negation (!) of the bits in self, truncating the result.
Source§impl ParamFlags
impl ParamFlags
Sourcepub const fn iter(&self) -> Iter<ParamFlags>
pub const fn iter(&self) -> Iter<ParamFlags>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<ParamFlags>
pub const fn iter_names(&self) -> IterNames<ParamFlags>
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
Source§impl Binary for ParamFlags
impl Binary for ParamFlags
Source§impl BitAnd for ParamFlags
impl BitAnd for ParamFlags
Source§fn bitand(self, other: ParamFlags) -> ParamFlags
fn bitand(self, other: ParamFlags) -> ParamFlags
The bitwise and (&) of the bits in self and other.
Source§type Output = ParamFlags
type Output = ParamFlags
& operator.Source§impl BitAndAssign for ParamFlags
impl BitAndAssign for ParamFlags
Source§fn bitand_assign(&mut self, other: ParamFlags)
fn bitand_assign(&mut self, other: ParamFlags)
The bitwise and (&) of the bits in self and other.
Source§impl BitOr for ParamFlags
impl BitOr for ParamFlags
Source§fn bitor(self, other: ParamFlags) -> ParamFlags
fn bitor(self, other: ParamFlags) -> ParamFlags
The bitwise or (|) of the bits in self and other.
Source§type Output = ParamFlags
type Output = ParamFlags
| operator.Source§impl BitOrAssign for ParamFlags
impl BitOrAssign for ParamFlags
Source§fn bitor_assign(&mut self, other: ParamFlags)
fn bitor_assign(&mut self, other: ParamFlags)
The bitwise or (|) of the bits in self and other.
Source§impl BitXor for ParamFlags
impl BitXor for ParamFlags
Source§fn bitxor(self, other: ParamFlags) -> ParamFlags
fn bitxor(self, other: ParamFlags) -> ParamFlags
The bitwise exclusive-or (^) of the bits in self and other.
Source§type Output = ParamFlags
type Output = ParamFlags
^ operator.Source§impl BitXorAssign for ParamFlags
impl BitXorAssign for ParamFlags
Source§fn bitxor_assign(&mut self, other: ParamFlags)
fn bitxor_assign(&mut self, other: ParamFlags)
The bitwise exclusive-or (^) of the bits in self and other.
Source§impl Clone for ParamFlags
impl Clone for ParamFlags
Source§fn clone(&self) -> ParamFlags
fn clone(&self) -> ParamFlags
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ParamFlags
Source§impl Debug for ParamFlags
impl Debug for ParamFlags
Source§impl Default for ParamFlags
impl Default for ParamFlags
Source§fn default() -> ParamFlags
fn default() -> ParamFlags
impl Eq for ParamFlags
Source§impl Extend<ParamFlags> for ParamFlags
impl Extend<ParamFlags> for ParamFlags
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = ParamFlags>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = ParamFlags>,
The bitwise or (|) of the bits in each flags value.
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 Flags for ParamFlags
impl Flags for ParamFlags
Source§const FLAGS: &'static [Flag<ParamFlags>]
const FLAGS: &'static [Flag<ParamFlags>]
Source§fn from_bits_retain(bits: u32) -> ParamFlags
fn from_bits_retain(bits: u32) -> ParamFlags
Source§fn all_named() -> ParamFlags
fn all_named() -> ParamFlags
Source§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
Source§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
Source§fn iter_defined_names() -> IterDefinedNames<Self>
fn iter_defined_names() -> IterDefinedNames<Self>
Self::FLAGS.Source§fn iter_equal_names(&self) -> IterEqualNames<Self>
fn iter_equal_names(&self) -> IterEqualNames<Self>
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in self and other.Source§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in self and other.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in self and other.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
Source§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in self and other.Source§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in self, truncating the result.Source§impl FromIterator<ParamFlags> for ParamFlags
impl FromIterator<ParamFlags> for ParamFlags
Source§fn from_iter<T>(iterator: T) -> ParamFlagswhere
T: IntoIterator<Item = ParamFlags>,
fn from_iter<T>(iterator: T) -> ParamFlagswhere
T: IntoIterator<Item = ParamFlags>,
The bitwise or (|) of the bits in each flags value.
Source§impl IntoIterator for ParamFlags
impl IntoIterator for ParamFlags
Source§type Item = ParamFlags
type Item = ParamFlags
Source§type IntoIter = Iter<ParamFlags>
type IntoIter = Iter<ParamFlags>
Source§fn into_iter(self) -> <ParamFlags as IntoIterator>::IntoIter
fn into_iter(self) -> <ParamFlags as IntoIterator>::IntoIter
Source§impl LowerHex for ParamFlags
impl LowerHex for ParamFlags
Source§impl Not for ParamFlags
impl Not for ParamFlags
Source§fn not(self) -> ParamFlags
fn not(self) -> ParamFlags
The bitwise negation (!) of the bits in self, truncating the result.
Source§type Output = ParamFlags
type Output = ParamFlags
! operator.Source§impl Octal for ParamFlags
impl Octal for ParamFlags
Source§impl PartialEq for ParamFlags
impl PartialEq for ParamFlags
Source§fn eq(&self, other: &ParamFlags) -> bool
fn eq(&self, other: &ParamFlags) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ParamFlags
Source§impl Sub for ParamFlags
impl Sub for ParamFlags
Source§fn sub(self, other: ParamFlags) -> ParamFlags
fn sub(self, other: ParamFlags) -> ParamFlags
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Source§type Output = ParamFlags
type Output = ParamFlags
- operator.Source§impl SubAssign for ParamFlags
impl SubAssign for ParamFlags
Source§fn sub_assign(&mut self, other: ParamFlags)
fn sub_assign(&mut self, other: ParamFlags)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.