Struct midi_file::core::ControlValue
source · pub struct ControlValue(/* private fields */);
Expand description
Represents a MIDI control value. The minimum value is 0
, the maximum value is 127
(i.e.
u7
). This type will clamp values to the valid range.
Implementations§
Trait Implementations§
source§impl Clone for ControlValue
impl Clone for ControlValue
source§fn clone(&self) -> ControlValue
fn clone(&self) -> ControlValue
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ControlValue
impl Debug for ControlValue
source§impl Default for ControlValue
impl Default for ControlValue
source§impl Display for ControlValue
impl Display for ControlValue
source§impl From<ControlValue> for u8
impl From<ControlValue> for u8
source§fn from(value: ControlValue) -> u8
fn from(value: ControlValue) -> u8
Converts to this type from the input type.
source§impl From<u8> for ControlValue
impl From<u8> for ControlValue
source§impl Hash for ControlValue
impl Hash for ControlValue
source§impl Ord for ControlValue
impl Ord for ControlValue
source§fn cmp(&self, other: &ControlValue) -> Ordering
fn cmp(&self, other: &ControlValue) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ControlValue
impl PartialEq for ControlValue
source§fn eq(&self, other: &ControlValue) -> bool
fn eq(&self, other: &ControlValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ControlValue
impl PartialOrd for ControlValue
source§fn partial_cmp(&self, other: &ControlValue) -> Option<Ordering>
fn partial_cmp(&self, other: &ControlValue) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ControlValue
impl Eq for ControlValue
impl StructuralEq for ControlValue
impl StructuralPartialEq for ControlValue
Auto Trait Implementations§
impl RefUnwindSafe for ControlValue
impl Send for ControlValue
impl Sync for ControlValue
impl Unpin for ControlValue
impl UnwindSafe for ControlValue
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more