AUDIO
Source snapshot · 12 October 2026

API reference / ravet_host::HostedParameters

Struct HostedParameters 

pub struct HostedParameters<'a, H: HostHandlers> { /* private fields */ }
Expand description

Exclusive main-thread parameter access to a live CLAP instance. Creation/refresh allocate and execute plugin code outside audio callbacks. The borrow prevents cached extensions from outliving or switching instances. No host parameter extension, automatic rescan or automation scheduler is implied.

Implementations§

§

impl<'a, H: HostHandlers> HostedParameters<'a, H>

pub fn new( instance: &'a mut PluginInstance<H>, maximum: usize, ) -> Result<Self, HostedParameterError>

Inspect at most maximum parameters (1..4096), accepting zero parameters.

pub fn refresh(&mut self) -> Result<(), HostedParameterError>

Replace the whole catalogue only after validation succeeds. The consumer decides when a plugin rescan/state change requires refreshing metadata.

pub fn parameters(&self) -> &[HostedParameter]

Validated owned metadata in current plugin enumeration order.

pub fn value(&mut self, id: ClapId) -> Result<f64, HostedParameterError>

Read a finite, in-range plain value by stable ID; no normalization/scaling.

pub fn set_inactive( &mut self, id: ClapId, value: f64, output: &mut OutputEvents<'_>, ) -> Result<(), HostedParameterError>

Send one zero-time global value to an inactive plugin. Caller supplies the outgoing queue; edits validate before invoking plugin code. This reports dispatch, not acknowledgement: query value to check resulting state. Active sample-timed automation belongs to the audio process event stream.

Auto Trait Implementations§

§

impl<'a, H> !RefUnwindSafe for HostedParameters<'a, H>

§

impl<'a, H> !Send for HostedParameters<'a, H>

§

impl<'a, H> !Sync for HostedParameters<'a, H>

§

impl<'a, H> !UnwindSafe for HostedParameters<'a, H>

§

impl<'a, H> Freeze for HostedParameters<'a, H>

§

impl<'a, H> Unpin for HostedParameters<'a, H>

§

impl<'a, H> UnsafeUnpin for HostedParameters<'a, H>

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> 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, 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.