[][src]Struct lv2_sys::LV2_Worker_Schedule

#[repr(C)]pub struct LV2_Worker_Schedule {
    pub handle: LV2_Worker_Schedule_Handle,
    pub schedule_work: Option<unsafe extern "C" fn(handle: LV2_Worker_Schedule_Handle, size: u32, data: *const c_void) -> LV2_Worker_Status>,
}

Schedule Worker Host Feature.

The host passes this feature to provide a schedule_work() function, which the plugin can use to schedule a worker call from run().

Fields

handle: LV2_Worker_Schedule_Handle

Opaque host data.

schedule_work: Option<unsafe extern "C" fn(handle: LV2_Worker_Schedule_Handle, size: u32, data: *const c_void) -> LV2_Worker_Status>

Request from run() that the host call the worker.

This function is in the audio threading class. It should be called from run() to request that the host call the work() method in a non-realtime context with the given arguments.

This function is always safe to call from run(), but it is not guaranteed that the worker is actually called from a different thread. In particular, when free-wheeling (for example, during offline rendering), the worker may be executed immediately. This allows single-threaded processing with sample accuracy and avoids timing problems when run() is executing much faster or slower than real-time.

Plugins SHOULD be written in such a way that if the worker runs immediately, and responses from the worker are delivered immediately, the effect of the work takes place immediately with sample accuracy.

The data MUST be safe for the host to copy and later pass to work(), and the host MUST guarantee that it will be eventually passed to work() if this function returns LV2_WORKER_SUCCESS.

@param handle The handle field of this struct. @param size The size of data. @param data Message to pass to work(), or NULL.

Trait Implementations

impl Clone for LV2_Worker_Schedule[src]

impl Copy for LV2_Worker_Schedule[src]

impl Debug for LV2_Worker_Schedule[src]

Auto Trait Implementations

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<T> From<T> for T[src]

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