PortPointerCache

Trait PortPointerCache 

Source
pub trait PortPointerCache: Sized + Default {
    // Required method
    fn connect(&mut self, index: u32, pointer: *mut c_void);
}
Expand description

Cache for port connection pointers.

The host will pass the port connection pointers one by one and in an undefined order. Therefore, the PortCollection struct can not be created instantly. Instead, the pointers will be stored in a cache, which is then used to create a proper port collection for the plugin.

Required Methods§

Source

fn connect(&mut self, index: u32, pointer: *mut c_void)

Store the connection pointer for the port with index index.

The passed pointer may not be valid yet and therefore, implementors should only store the pointer, not dereference it.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl PortPointerCache for ()

Source§

fn connect(&mut self, _index: u32, _pointer: *mut c_void)

Implementors§