[−]Struct fluidlite::Hints
The setting hints
Methods
impl Hints
pub const BOUNDED_BELOW: Hints
Hint BOUNDED_BELOW indicates that the LowerBound field of the FLUID_PortRangeHint should be considered meaningful. The value in this field should be considered the (inclusive) lower bound of the valid range. If SAMPLE_RATE is also specified then the value of LowerBound should be multiplied by the sample rate.
pub const BOUNDED_ABOVE: Hints
Hint BOUNDED_ABOVE indicates that the UpperBound field of the FLUID_PortRangeHint should be considered meaningful. The value in this field should be considered the (inclusive) upper bound of the valid range. If SAMPLE_RATE is also specified then the value of UpperBound should be multiplied by the sample rate.
pub const TOGGLED: Hints
Hint TOGGLED indicates that the data item should be
considered a Boolean toggle. Data less than or equal to zero should
be considered off' or
false,' and data above zero should be
considered on' or
true.' TOGGLED may not be used in
conjunction with any other hint except DEFAULT_0 or
DEFAULT_1.
pub const SAMPLE_RATE: Hints
Hint SAMPLE_RATE indicates that any bounds specified should be interpreted as multiples of the sample rate. For instance, a frequency range from 0Hz to the Nyquist frequency (half the sample rate) could be requested by this hint in conjunction with LowerBound = 0 and UpperBound = 0.5. Hosts that support bounds at all must support this hint to retain meaning.
pub const LOGARITHMIC: Hints
Hint LOGARITHMIC indicates that it is likely that the user will find it more intuitive to view values using a logarithmic scale. This is particularly useful for frequencies and gains.
pub const INTEGER: Hints
Hint INTEGER indicates that a user interface would probably wish to provide a stepped control taking only integer values. Any bounds set should be slightly wider than the actual integer range required to avoid floating point rounding errors. For instance, the integer set {0,1,2,3} might be described as [-0.1, 3.1].
pub const FILENAME: Hints
pub const OPTIONLIST: Hints
pub const fn empty() -> Hints
Returns an empty set of flags
pub const fn all() -> Hints
Returns the set containing all flags.
pub const fn bits(&self) -> i32
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: i32) -> Option<Hints>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub const fn from_bits_truncate(bits: i32) -> Hints
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub const unsafe fn from_bits_unchecked(bits: i32) -> Hints
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
pub const fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub const fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub const fn intersects(&self, other: Hints) -> bool
Returns true
if there are flags common to both self
and other
.
pub const fn contains(&self, other: Hints) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: Hints)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: Hints)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: Hints)
Toggles the specified flags in-place.
pub fn set(&mut self, other: Hints, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Binary for Hints
impl BitAnd<Hints> for Hints
type Output = Hints
The resulting type after applying the &
operator.
fn bitand(self, other: Hints) -> Hints
Returns the intersection between the two sets of flags.
impl BitAndAssign<Hints> for Hints
fn bitand_assign(&mut self, other: Hints)
Disables all flags disabled in the set.
impl BitOr<Hints> for Hints
type Output = Hints
The resulting type after applying the |
operator.
fn bitor(self, other: Hints) -> Hints
Returns the union of the two sets of flags.
impl BitOrAssign<Hints> for Hints
fn bitor_assign(&mut self, other: Hints)
Adds the set of flags.
impl BitXor<Hints> for Hints
type Output = Hints
The resulting type after applying the ^
operator.
fn bitxor(self, other: Hints) -> Hints
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign<Hints> for Hints
fn bitxor_assign(&mut self, other: Hints)
Toggles the set of flags.
impl Clone for Hints
fn clone(&self) -> Hints
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Hints
impl Debug for Hints
impl Eq for Hints
impl Extend<Hints> for Hints
fn extend<T: IntoIterator<Item = Hints>>(&mut self, iterator: T)
impl FromIterator<Hints> for Hints
fn from_iter<T: IntoIterator<Item = Hints>>(iterator: T) -> Hints
impl Hash for Hints
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl LowerHex for Hints
impl Not for Hints
type Output = Hints
The resulting type after applying the !
operator.
fn not(self) -> Hints
Returns the complement of this set of flags.
impl Octal for Hints
impl Ord for Hints
fn cmp(&self, other: &Hints) -> Ordering
#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Hints> for Hints
impl PartialOrd<Hints> for Hints
fn partial_cmp(&self, other: &Hints) -> Option<Ordering>
fn lt(&self, other: &Hints) -> bool
fn le(&self, other: &Hints) -> bool
fn gt(&self, other: &Hints) -> bool
fn ge(&self, other: &Hints) -> bool
impl StructuralEq for Hints
impl StructuralPartialEq for Hints
impl Sub<Hints> for Hints
type Output = Hints
The resulting type after applying the -
operator.
fn sub(self, other: Hints) -> Hints
Returns the set difference of the two sets of flags.
impl SubAssign<Hints> for Hints
fn sub_assign(&mut self, other: Hints)
Disables all flags enabled in the set.
impl UpperHex for Hints
Auto Trait Implementations
impl RefUnwindSafe for Hints
impl Send for Hints
impl Sync for Hints
impl Unpin for Hints
impl UnwindSafe for Hints
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,