[][src]Trait kpal_plugin::PluginAPI

pub trait PluginAPI<E: Error + PluginError> {
    type Plugin;
    fn new() -> Result<Self::Plugin, E>;
fn attribute_name(&self, id: usize) -> Result<&CStr, E>;
fn attribute_value(&self, id: usize) -> Result<Value, E>;
fn attribute_set_value(&mut self, id: usize, value: &Value) -> Result<(), E>; }

The set of functions that must be implemented by a plugin.

Associated Types

type Plugin

Loading content...

Required methods

fn new() -> Result<Self::Plugin, E>

Initializes and returns a new instance of the plugin.

fn attribute_name(&self, id: usize) -> Result<&CStr, E>

Returns the name of an attribute of the plugin.

fn attribute_value(&self, id: usize) -> Result<Value, E>

Returns the value of an attribute of the plugin.

fn attribute_set_value(&mut self, id: usize, value: &Value) -> Result<(), E>

Sets the value of an attribute.

Loading content...

Implementors

Loading content...