WritableParameter

Trait WritableParameter 

Source
pub trait WritableParameter: Sized {
    // Required method
    fn set_parameter(self, dsp: Dsp, index: c_int) -> Result<()>;
}
Expand description

Trait for types that can be written to DSP parameters.

You should either defer to Dsp::set_parameter or call FMOD_DSP_SetParameterData.

§Data types

Implementing this trait for anything aside from data types is relatively trivial. If you are implementing this for a data type, you must validate that the parameter type at index matches what you expect it to be. You can usually do this by getting the raw parameter info and checking that the FMOD_DSP_PARAMETER_DATA_TYPE field matches what you expect.

There are hidden methods on Dsp that can help you write correct implementations for Sized types.

Required Methods§

Source

fn set_parameter(self, dsp: Dsp, index: c_int) -> Result<()>

Set the parameter at index.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl WritableParameter for bool

Source§

fn set_parameter(self, dsp: Dsp, index: c_int) -> Result<()>

Source§

impl WritableParameter for c_float

Source§

fn set_parameter(self, dsp: Dsp, index: c_int) -> Result<()>

Source§

impl WritableParameter for c_int

Source§

fn set_parameter(self, dsp: Dsp, index: c_int) -> Result<()>

Implementors§