AUDIO
Source snapshot · 11 November 2026

API reference / ravet_plugin::product::Product

Struct Product 

pub struct Product<'a> { /* private fields */ }
Expand description

Everything formats need to describe one plug-in.

Build it with Product::new and the with_* methods, usually as a const, then call Product::resolve to validate it.

Implementations§

§

impl<'a> Product<'a>

pub const fn new( name: &'a str, vendor: &'a str, version: &'a str, plugin_id: &'a str, category: Category, state: StateFormat, ) -> Self

A product with a stereo layout (stereo output only for instruments), f32 processing, no notes and no parameters.

version has three numeric components. plugin_id is a reverse-domain identity such as com.example.delay; format identities derive from it.

pub const fn with_layouts(self, layouts: &'a [AudioLayout]) -> Self

Supported main-bus layouts, preferred first. Hosts may choose any of them.

pub const fn with_auxiliary_buses(self, buses: &'a [AuxiliaryBus<'a>]) -> Self

Audio buses beyond the main bus, in the order the processor receives them (at most MAXIMUM_AUXILIARY_BUSES); see AuxiliaryBus. Every main layout uses the same auxiliary buses.

pub const fn with_notes(self, notes: NotePorts) -> Self

pub const fn with_precision(self, precision: Precision) -> Self

pub const fn with_parameters(self, parameters: &'a [Parameter<'a>]) -> Self

pub const fn with_url(self, url: &'a str) -> Self

pub const fn with_editor(self, editor: Editor<'a>) -> Self

Give the product a web editor.

pub const fn with_editor_assets(self, assets: &'a [EditorAsset<'a>]) -> Self

Files the editor page loads by relative URL; see EditorAsset. Requires Product::with_editor.

pub const fn with_identities(self, identities: IdentityOverrides<'a>) -> Self

Keep format identities from an earlier product instead of deriving them.

pub const fn with_automation(self, automation: AutomationPolicy) -> Self

How parameter changes reach the processor within a block; see AutomationPolicy. The default is sample-accurate.

pub const fn with_bypass(self, bypass: BypassPolicy) -> Self

How the host bypass parameter is applied; see BypassPolicy. The default passes it to the processor. Other policies require a Parameter::bypass parameter.

pub const fn with_maximum_latency(self, samples: u32) -> Self

The most latency, in samples, the processor can report while active (at most MAXIMUM_BYPASS_LATENCY). Bypass policies other than BypassPolicy::Processor size their latency-compensating dry delay for the larger of this and the latency reported after prepare; declare it when parameters or state can raise the latency after preparation. Unused with BypassPolicy::Processor. The default is 0.

pub fn name(&self) -> &'a str

pub fn vendor(&self) -> &'a str

pub fn version(&self) -> &'a str

pub fn plugin_id(&self) -> &'a str

pub fn url(&self) -> &'a str

pub fn category(&self) -> Category

pub fn layouts(&self) -> &'a [AudioLayout]

pub fn auxiliary_buses(&self) -> &'a [AuxiliaryBus<'a>]

pub fn auxiliary_layouts(&self) -> Vec<AudioLayout>

The auxiliary buses’ layouts, in order, for ProcessConfig::with_auxiliary_buses. Invalid buses are skipped; Product::resolve rejects them.

pub fn notes(&self) -> NotePorts

pub fn precision(&self) -> Precision

pub fn parameters(&self) -> &'a [Parameter<'a>]

pub fn state_format(&self) -> StateFormat

pub fn identity_overrides(&self) -> IdentityOverrides<'a>

pub fn editor(&self) -> Option<Editor<'a>>

pub fn editor_assets(&self) -> &'a [EditorAsset<'a>]

pub fn automation(&self) -> AutomationPolicy

pub fn bypass_policy(&self) -> BypassPolicy

pub fn maximum_latency(&self) -> u32

The declared maximum latency; see Product::with_maximum_latency.

pub fn resolve(&self) -> Result<ResolvedProduct<'a>, ProductError>

Validate the description and resolve parameter IDs and format identities. Allocates; call on a control thread.

Trait Implementations§

§

impl<'a> Clone for Product<'a>

§

fn clone(&self) -> Product<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<'a> Copy for Product<'a>

§

impl<'a> Debug for Product<'a>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Product<'a>

§

impl<'a> RefUnwindSafe for Product<'a>

§

impl<'a> Send for Product<'a>

§

impl<'a> Sync for Product<'a>

§

impl<'a> Unpin for Product<'a>

§

impl<'a> UnsafeUnpin for Product<'a>

§

impl<'a> UnwindSafe for Product<'a>

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AutoreleaseSafe for T
where T: ?Sized,

§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where 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>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.