[−][src]Struct lv2_sys::_LV2_Worker_Interface
Plugin Worker Interface.
This is the interface provided by the plugin to implement a worker method. The plugin's extension_data() method should return an LV2_Worker_Interface when called with LV2_WORKER__interface as its argument.
Fields
work: Option<unsafe extern "C" fn(instance: LV2_Handle, respond: LV2_Worker_Respond_Function, handle: LV2_Worker_Respond_Handle, size: u32, data: *const c_void) -> LV2_Worker_Status>
The worker method. This is called by the host in a non-realtime context as requested, possibly with an arbitrary message to handle.
A response can be sent to run() using respond
. The plugin MUST NOT
make any assumptions about which thread calls this method, except that
there are no real-time requirements and only one call may be executed at
a time. That is, the host MAY call this method from any non-real-time
thread, but MUST NOT make concurrent calls to this method from several
threads.
@param instance The LV2 instance this is a method on.
@param respond A function for sending a response to run().
@param handle Must be passed to respond
if it is called.
@param size The size of data
.
@param data Data from run(), or NULL.
work_response: Option<unsafe extern "C" fn(instance: LV2_Handle, size: u32, body: *const c_void) -> LV2_Worker_Status>
Handle a response from the worker. This is called by the host in the run() context when a response from the worker is ready.
@param instance The LV2 instance this is a method on.
@param size The size of body
.
@param body Message body, or NULL.
end_run: Option<unsafe extern "C" fn(instance: LV2_Handle) -> LV2_Worker_Status>
Called when all responses for this cycle have been delivered.
Since work_response() may be called after run() finished, this provides a hook for code that must run after the cycle is completed.
This field may be NULL if the plugin has no use for it. Otherwise, the host MUST call it after every run(), regardless of whether or not any responses were sent that cycle.
Trait Implementations
impl Clone for _LV2_Worker_Interface
[src]
fn clone(&self) -> _LV2_Worker_Interface
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for _LV2_Worker_Interface
[src]
impl Debug for _LV2_Worker_Interface
[src]
Auto Trait Implementations
impl RefUnwindSafe for _LV2_Worker_Interface
impl Send for _LV2_Worker_Interface
impl Sync for _LV2_Worker_Interface
impl Unpin for _LV2_Worker_Interface
impl UnwindSafe for _LV2_Worker_Interface
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,