pub struct TrigFlags(/* private fields */);
Expand description

A struct that holds the trig flags.

Methods from Deref<Target = u16>§

1.43.0 · source

pub const MIN: u16 = 0u16

1.43.0 · source

pub const MAX: u16 = 65_535u16

1.53.0 · source

pub const BITS: u32 = 16u32

Trait Implementations§

source§

impl Clone for TrigFlags

source§

fn clone(&self) -> TrigFlags

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TrigFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TrigFlags

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Deref for TrigFlags

§

type Target = u16

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for TrigFlags

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<'de> Deserialize<'de> for TrigFlags

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for TrigFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<&TrigFlags> for u16

source§

fn from(flags: &TrigFlags) -> Self

Converts to this type from the input type.
source§

impl From<&u16> for TrigFlags

source§

fn from(flags: &u16) -> Self

Converts to this type from the input type.
source§

impl From<TrigFlags> for u16

source§

fn from(flags: TrigFlags) -> Self

Converts to this type from the input type.
source§

impl From<u16> for TrigFlags

source§

fn from(flags: u16) -> Self

Converts to this type from the input type.
source§

impl HoldsTrigFlags for TrigFlags

source§

fn raw_trig_flags(&self) -> u16

Returns the raw flags value.
source§

fn raw_trig_flags_mut(&mut self) -> &mut u16

Returns a mutable reference to the raw flags value.
source§

fn set_trig_enable(&mut self, enable: bool)

Enables or disables a trig.
source§

fn set_retrig(&mut self, enable: bool)

Enables or disables a trig’s retrig option.
source§

fn set_mute(&mut self, enable: bool)

Enables or disables a trig’s mute option.
source§

fn set_accent(&mut self, enable: bool)

Enables or disables a trig’s accent option.
source§

fn set_swing(&mut self, enable: bool)

Enables or disables a trig’s swing option.
source§

fn set_slide(&mut self, enable: bool)

Enables or disables a trig’s slide option.
source§

fn set_parameter_lock_lfo_switch(&mut self, enable: bool)

source§

fn set_parameter_lock_lfo(&mut self, enable: bool)

source§

fn set_parameter_lock_synth_switch(&mut self, enable: bool)

source§

fn set_parameter_lock_synth(&mut self, enable: bool)

source§

fn set_parameter_lock_sample_switch(&mut self, enable: bool)

source§

fn set_parameter_lock_sample(&mut self, enable: bool)

source§

fn set_parameter_lock_env_switch(&mut self, enable: bool)

source§

fn set_parameter_lock_env(&mut self, enable: bool)

source§

fn enabled_trig(&self) -> bool

Returns true if the trig is enabled.
source§

fn enabled_retrig(&self) -> bool

Returns true if the trig’s retrig option is enabled.
source§

fn enabled_mute(&self) -> bool

Returns true if the trig’s mute option is enabled.
source§

fn enabled_accent(&self) -> bool

Returns true if the trig’s accent option is enabled.
source§

fn enabled_swing(&self) -> bool

Returns true if the trig’s swing option is enabled.
source§

fn enabled_slide(&self) -> bool

Returns true if the trig’s slide option is enabled.
source§

fn enabled_parameter_lock_lfo_switch(&self) -> bool

source§

fn enabled_parameter_lock_lfo(&self) -> bool

source§

fn enabled_parameter_lock_synth_switch(&self) -> bool

source§

fn enabled_parameter_lock_synth(&self) -> bool

source§

fn enabled_parameter_lock_sample_switch(&self) -> bool

source§

fn enabled_parameter_lock_sample(&self) -> bool

source§

fn enabled_parameter_lock_env_switch(&self) -> bool

source§

fn enabled_parameter_lock_env(&self) -> bool

source§

fn swap_all_flags(&mut self, flags: &impl HoldsTrigFlags)

Sets all flags to the given value.
source§

fn unset_all_flags(&mut self)

Sets all flags to 0.
source§

fn flip_all_flags(&mut self, flags: &impl HoldsTrigFlags)

Flips all flags.
source§

fn set_difference_from(&mut self, other: &impl HoldsTrigFlags)

Sets the current flags to the intersection between the current flags and the given flags.
source§

fn set_intersection_with(&mut self, other: &impl HoldsTrigFlags)

Sets the current flags to the union between the current flags and the given flags.
source§

fn set_union_with(&mut self, other: &impl HoldsTrigFlags)

Sets the current flags to the union between the current flags and the given flags.
source§

fn get_difference_from(&self, other: &impl HoldsTrigFlags) -> u16

Returns the difference between the current flags and the given flags.
source§

fn get_intersection_with(&self, other: &impl HoldsTrigFlags) -> u16

Returns the intersection between the current flags and the given flags.
source§

fn get_union_with(&self, other: &impl HoldsTrigFlags) -> u16

Returns the union between the current flags and the given flags.
source§

impl Serialize for TrigFlags

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for TrigFlags

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,