Struct rsynth::backend::vst_backend::vst::api::Events[]

#[repr(C)]pub struct Events {
    pub num_events: i32,
    pub _reserved: isize,
    pub events: [*mut Event; 2],
}

A struct which contains events.

Fields

num_events: i32

Number of events.

_reserved: isize

Reserved for future use. Should be 0.

events: [*mut Event; 2]

Variable-length array of pointers to api::Event objects.

The VST standard specifies a variable length array of initial size 2. If there are more than 2 elements a larger array must be stored in this structure.

Implementations

impl Events

pub fn events(&'a self) -> impl Iterator<Item = Event<'a>>

Use this in your impl of process_events() to process the incoming midi events.

Example

fn process_events(&mut self, events: &api::Events) {
    for e in events.events() {
        match e {
            Event::Midi(MidiEvent { data, .. }) => {
                // ...
            }
            _ => ()
        }
    }
}

Auto Trait Implementations

impl RefUnwindSafe for Events

impl !Send for Events

impl !Sync for Events

impl Unpin for Events

impl UnwindSafe for Events

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, 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.