Struct reaper_medium::MidiEvent
source · [−]#[repr(transparent)]pub struct MidiEvent(_);
Expand description
An owned or borrowed MIDI event for or from REAPER.
Cannot own more than a short MIDI message (just like the low-level equivalent).
Implementations
sourceimpl MidiEvent
impl MidiEvent
sourcepub fn from_raw(raw: MIDI_event_t) -> MidiEvent
pub fn from_raw(raw: MIDI_event_t) -> MidiEvent
Turns the given owned low-level MIDI event into a medium-level one.
sourcepub fn from_raw_ref(raw: &MIDI_event_t) -> &MidiEvent
pub fn from_raw_ref(raw: &MIDI_event_t) -> &MidiEvent
Turns the given low-level MIDI event reference into a medium-level one.
sourcepub fn frame_offset(&self) -> MidiFrameOffset
pub fn frame_offset(&self) -> MidiFrameOffset
Returns the frame offset.
sourcepub fn set_frame_offset(&mut self, offset: MidiFrameOffset)
pub fn set_frame_offset(&mut self, offset: MidiFrameOffset)
Sets the frame offset.
sourcepub fn message(&self) -> &MidiMessage
pub fn message(&self) -> &MidiMessage
Returns the actual message.
sourcepub fn set_message(&mut self, message: impl ShortMessage)
pub fn set_message(&mut self, message: impl ShortMessage)
Sets the actual message.
Trait Implementations
sourceimpl AsRef<MIDI_event_t> for MidiEvent
impl AsRef<MIDI_event_t> for MidiEvent
sourcefn as_ref(&self) -> &MIDI_event_t
fn as_ref(&self) -> &MIDI_event_t
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl RefCast for MidiEvent
impl RefCast for MidiEvent
type From = MIDI_event_t
fn ref_cast(_from: &Self::From) -> &Self
fn ref_cast_mut(_from: &mut Self::From) -> &mut Self
impl Copy for MidiEvent
impl Eq for MidiEvent
impl StructuralEq for MidiEvent
impl StructuralPartialEq for MidiEvent
Auto Trait Implementations
impl RefUnwindSafe for MidiEvent
impl Send for MidiEvent
impl Sync for MidiEvent
impl Unpin for MidiEvent
impl UnwindSafe for MidiEvent
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