Struct vst::api::Events

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

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§

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§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.