Skip to main content

HostResponse

Enum HostResponse 

Source
pub enum HostResponse {
    Success {
        message: String,
    },
    Error {
        message: String,
    },
    Crashed {
        message: String,
    },
    AudioOutput {
        outputs: Vec<Vec<f32>>,
        output_midi: Vec<MidiEvent>,
    },
    ParameterValue {
        value: f64,
    },
    ParameterString {
        value: String,
    },
    Parameters {
        params: Vec<Parameter>,
    },
    State {
        data: Vec<u8>,
    },
    GuiCreated {
        width: i32,
        height: i32,
    },
    PluginInfo {
        vendor: String,
        name: String,
        version: String,
        category: String,
        uid: String,
        has_gui: bool,
        audio_inputs: i32,
        audio_outputs: i32,
        output_channels: i32,
        has_midi_input: bool,
        has_midi_output: bool,
    },
}
Expand description

Responses from the isolated plugin process

Variants§

§

Success

Operation succeeded with message

Fields

§message: String

Human-readable success detail.

§

Error

Operation failed with error

Fields

§message: String

Error detail.

§

Crashed

Plugin crashed

Fields

§message: String

Crash detail.

§

AudioOutput

Per-channel audio output data ([channel][frame]), plus any MIDI the plugin emitted during the block (arpeggiators, MPE, etc.).

Fields

§outputs: Vec<Vec<f32>>

Output samples per channel.

§output_midi: Vec<MidiEvent>

MIDI events the plugin emitted this block, in order.

§

ParameterValue

A single parameter value (normalized).

Fields

§value: f64

Normalized value.

§

ParameterString

A formatted parameter display string.

Fields

§value: String

The plugin-rendered display string.

§

Parameters

A list of parameters.

Fields

§params: Vec<Parameter>

All parameters reported by the plugin.

§

State

Opaque plugin state bytes (reply to SaveState).

Fields

§data: Vec<u8>

The serialized state.

§

GuiCreated

The isolated editor window was created (reply to CreateGui); carries the plugin-reported editor size so the host can report it without a second round-trip.

Fields

§width: i32

Editor width in pixels.

§height: i32

Editor height in pixels.

§

PluginInfo

Plugin information

Fields

§vendor: String

Vendor / manufacturer.

§name: String

Plugin name.

§version: String

Version string (may be empty if the plugin doesn’t report one).

§category: String

Plugin sub-categories (e.g. “Fx”, “Instrument|Synth”); may be empty.

§uid: String

Unique plugin class id (hex).

§has_gui: bool

Whether the plugin has an editor.

§audio_inputs: i32

Audio input bus count.

§audio_outputs: i32

Audio output bus count.

§output_channels: i32

Total output audio channels across all output buses.

§has_midi_input: bool

Whether the plugin has a MIDI/event input bus.

§has_midi_output: bool

Whether the plugin has a MIDI/event output bus.

Trait Implementations§

Source§

impl Debug for HostResponse

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for HostResponse

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for HostResponse

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.