Struct reaper_medium::MidiMessage
source · [−]#[repr(transparent)]pub struct MidiMessage(_);
Expand description
An MIDI message borrowed from a REAPER MIDI event.
Can also be owned but contains more information than necessary because it contains also event data.
Implementations
Trait Implementations
sourceimpl Clone for MidiMessage
impl Clone for MidiMessage
sourcefn clone(&self) -> MidiMessage
fn clone(&self) -> MidiMessage
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for MidiMessage
impl Debug for MidiMessage
sourceimpl Default for MidiMessage
impl Default for MidiMessage
sourcefn default() -> MidiMessage
fn default() -> MidiMessage
Returns the “default value” for a type. Read more
sourceimpl Hash for MidiMessage
impl Hash for MidiMessage
sourceimpl PartialEq<MidiMessage> for MidiMessage
impl PartialEq<MidiMessage> for MidiMessage
sourcefn eq(&self, other: &MidiMessage) -> bool
fn eq(&self, other: &MidiMessage) -> bool
sourceimpl RefCast for MidiMessage
impl RefCast for MidiMessage
type From = MIDI_event_t
fn ref_cast(_from: &Self::From) -> &Self
fn ref_cast_mut(_from: &mut Self::From) -> &mut Self
sourceimpl ShortMessage for MidiMessage
impl ShortMessage for MidiMessage
sourcefn status_byte(&self) -> u8
fn status_byte(&self) -> u8
Returns the status byte.
sourcefn data_byte_1(&self) -> U7
fn data_byte_1(&self) -> U7
Returns the first data byte.
sourcefn data_byte_2(&self) -> U7
fn data_byte_2(&self) -> U7
Returns the second data byte.
sourcefn to_bytes(&self) -> (u8, U7, U7)
fn to_bytes(&self) -> (u8, U7, U7)
Returns the status byte and the two data bytes as a tuple. Read more
sourcefn to_other<O>(&self) -> Owhere
O: ShortMessageFactory,
fn to_other<O>(&self) -> Owhere
O: ShortMessageFactory,
Converts this message to a short message of another type.
sourcefn to_structured(&self) -> StructuredShortMessage
fn to_structured(&self) -> StructuredShortMessage
Converts this message to a
StructuredShortMessage
, which is ideal for matching.sourcefn type(&self) -> ShortMessageType
fn type(&self) -> ShortMessageType
Returns the type of this message.
sourcefn super_type(&self) -> MessageSuperType
fn super_type(&self) -> MessageSuperType
Returns the super type of this message.
sourcefn main_category(&self) -> MessageMainCategory
fn main_category(&self) -> MessageMainCategory
Returns the main category of this message.
sourcefn is_note_on(&self) -> bool
fn is_note_on(&self) -> bool
sourcefn is_note_off(&self) -> bool
fn is_note_off(&self) -> bool
sourcefn key_number(&self) -> Option<KeyNumber>
fn key_number(&self) -> Option<KeyNumber>
Returns the key number of this message if applicable.
sourcefn controller_number(&self) -> Option<ControllerNumber>
fn controller_number(&self) -> Option<ControllerNumber>
Returns the controller number of this message if applicable.
sourcefn control_value(&self) -> Option<U7>
fn control_value(&self) -> Option<U7>
Returns the control value of this message if applicable.
sourcefn program_number(&self) -> Option<U7>
fn program_number(&self) -> Option<U7>
Returns the program number of this message if applicable.
sourcefn pressure_amount(&self) -> Option<U7>
fn pressure_amount(&self) -> Option<U7>
Returns the pressure amount of this message if applicable.
sourcefn pitch_bend_value(&self) -> Option<U14>
fn pitch_bend_value(&self) -> Option<U14>
Returns the pitch bend value of this message if applicable.
impl Copy for MidiMessage
impl Eq for MidiMessage
impl StructuralEq for MidiMessage
impl StructuralPartialEq for MidiMessage
Auto Trait Implementations
impl RefUnwindSafe for MidiMessage
impl Send for MidiMessage
impl Sync for MidiMessage
impl Unpin for MidiMessage
impl UnwindSafe for MidiMessage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more