Struct rsynth::event::RawMidiEvent[][src]

pub struct RawMidiEvent { /* fields omitted */ }

A raw midi event.

Implementations

impl RawMidiEvent[src]

pub fn new(bytes: &[u8]) -> Self[src]

Create a new RawMidiEvent with the given raw data.

Panics

Panics when data does not have length 1, 2 or 3.

pub fn try_new(data: &[u8]) -> Option<Self>[src]

Try to create a new RawMidiEvent with the given raw data. Return None when data does not have length 1, 2 or 3.

pub fn data(&self) -> &[u8; 3][src]

Get the raw data from a RawMidiEvent, including “padding”.

pub fn bytes(&self) -> &[u8][src]

Get the raw data from a RawMidiEvent.

Trait Implementations

impl AsMut<RawMidiEvent> for RawMidiEvent[src]

impl AsRef<RawMidiEvent> for RawMidiEvent[src]

impl Clone for RawMidiEvent[src]

impl Copy for RawMidiEvent[src]

impl Debug for RawMidiEvent[src]

impl Eq for RawMidiEvent[src]

impl PartialEq<RawMidiEvent> for RawMidiEvent[src]

impl StructuralEq for RawMidiEvent[src]

impl StructuralPartialEq for RawMidiEvent[src]

impl<'a> TryFrom<TrackEventKind<'a>> for RawMidiEvent[src]

type Error = MidlyConversionError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for RawMidiEvent

impl Send for RawMidiEvent

impl Sync for RawMidiEvent

impl Unpin for RawMidiEvent

impl UnwindSafe for RawMidiEvent

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<S, T> Duplex<S> for T where
    T: FromSample<S> + ToSample<S>, 

impl<T> From<T> for T[src]

impl<S> FromSample<S> for S

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> ToSample<U> for T where
    U: FromSample<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.