pub struct Lv2PluginDescriptor {
pub uri: String,
pub name: String,
pub vendor: String,
pub version: String,
pub ports: Vec<Lv2Port>,
pub parameters: Vec<ParameterDescriptor>,
}Expand description
An LV2-shaped plugin description that lowers to a core PluginDescriptor.
Collects the LV2 plugin identity, its Lv2Port declarations, and its
ParameterDescriptor set, then converts to the format-neutral descriptor
via Lv2PluginDescriptor::to_plugin_descriptor.
Fields§
§uri: StringThe plugin’s LV2 URI, used as its stable id.
name: StringThe human-readable plugin name.
vendor: StringThe vendor string (defaults to "sim").
version: StringThe plugin version (defaults to this crate’s package version).
ports: Vec<Lv2Port>The declared ports, in index order.
parameters: Vec<ParameterDescriptor>The declared automatable parameters.
Implementations§
Source§impl Lv2PluginDescriptor
impl Lv2PluginDescriptor
Sourcepub fn new(uri: impl Into<String>, name: impl Into<String>) -> Result<Self>
pub fn new(uri: impl Into<String>, name: impl Into<String>) -> Result<Self>
Builds a descriptor from a uri and name, with empty ports/parameters.
The vendor defaults to "sim" and the version to this crate’s package
version.
§Errors
Returns Error::Eval when uri or name is blank.
Sourcepub fn with_port(self, port: Lv2Port) -> Self
pub fn with_port(self, port: Lv2Port) -> Self
Appends port and returns the updated descriptor (builder style).
Sourcepub fn with_parameter(self, parameter: ParameterDescriptor) -> Self
pub fn with_parameter(self, parameter: ParameterDescriptor) -> Self
Appends parameter and returns the updated descriptor (builder style).
Sourcepub fn port_decls(&self) -> Vec<PortDecl>
pub fn port_decls(&self) -> Vec<PortDecl>
Lowers every declared port to a graph PortDecl, in index order.
Sourcepub fn to_plugin_descriptor(&self) -> Result<PluginDescriptor>
pub fn to_plugin_descriptor(&self) -> Result<PluginDescriptor>
Converts this LV2 description to a format-neutral PluginDescriptor.
§Errors
Returns an error when the core PluginId or PluginDescriptor
rejects the URI, name, vendor, or version.
Trait Implementations§
Source§impl Clone for Lv2PluginDescriptor
impl Clone for Lv2PluginDescriptor
Source§fn clone(&self) -> Lv2PluginDescriptor
fn clone(&self) -> Lv2PluginDescriptor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Lv2PluginDescriptor
impl Debug for Lv2PluginDescriptor
Source§impl PartialEq for Lv2PluginDescriptor
impl PartialEq for Lv2PluginDescriptor
Source§fn eq(&self, other: &Lv2PluginDescriptor) -> bool
fn eq(&self, other: &Lv2PluginDescriptor) -> bool
self and other values to be equal, and is used by ==.