ReadableParameter

Trait ReadableParameter 

Source
pub trait ReadableParameter: Sized {
    // Required methods
    fn get_parameter(dsp: Dsp, index: c_int) -> Result<Self>;
    fn get_parameter_string(dsp: Dsp, index: c_int) -> Result<Utf8CString>;
}
Expand description

Trait for types that can be read from DSP parameters.

You should either defer to Dsp::get_parameter or call FMOD_DSP_GetParameterData.

§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 get_parameter(dsp: Dsp, index: c_int) -> Result<Self>

Get the parameter at index.

Source

fn get_parameter_string(dsp: Dsp, index: c_int) -> Result<Utf8CString>

Get the parameter string 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 ReadableParameter for bool

Source§

impl ReadableParameter for Box<ImpulseResponse>

Source§

impl ReadableParameter for c_float

Source§

impl ReadableParameter for c_int

Implementors§