[][src]Struct kpal_plugin::Plugin

#[repr(C)]
pub struct Plugin {
    pub plugin_data: *mut PluginData,
    pub vtable: VTable,
}

A Plugin combines the data that determines its state and with its functionality.

This struct holds a raw pointer to a data struct that is created by the plugin library. In addition, it contains the vtable of function pointers defined by the C API and implemented within the plugin library.

Safety

The plugin implements the Send trait because after creation the plugin is moved into the thread that is dedicated to the plugin that it manages. Once it is moved, it will only ever be owned and used by this single thread by design.

Fields

plugin_data: *mut PluginData

A pointer to a struct containing the state of the plugin.

vtable: VTable

The table of function pointers that define part of the plugin API.

Trait Implementations

impl Clone for Plugin[src]

impl Debug for Plugin[src]

impl Drop for Plugin[src]

fn drop(&mut self)[src]

Frees the memory allocated to the plugin data.

impl Send for Plugin[src]

Auto Trait Implementations

impl RefUnwindSafe for Plugin

impl !Sync for Plugin

impl Unpin for Plugin

impl UnwindSafe for Plugin

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.