pub struct HostCallback { /* private fields */ }Expand description
A reference to the host which allows the plugin to call back and access information.
§Panics
All methods in this struct will panic if the plugin has not yet been initialized. In practice,
this can only occur if the plugin queries the host for information when Default::default() is
called.
ⓘ
struct ExamplePlugin;
impl Default for ExamplePlugin {
fn default() -> ExamplePlugin {
// Will panic, don't do this. If needed, you can query
// the host during initialization via Vst::new()
let host: HostCallback = Default::default();
let version = host.vst_version();
// ...
}
}Implementations§
Source§impl HostCallback
impl HostCallback
Sourcepub fn vst_version(&self) -> i32
pub fn vst_version(&self) -> i32
Get the VST API version supported by the host e.g. 2400 = VST 2.4.
Trait Implementations§
Source§impl Default for HostCallback
HostCallback implements Default so that the plugin can implement Default and have a
HostCallback field.
impl Default for HostCallback
HostCallback implements Default so that the plugin can implement Default and have a
HostCallback field.
Source§fn default() -> HostCallback
fn default() -> HostCallback
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HostCallback
impl RefUnwindSafe for HostCallback
impl !Send for HostCallback
impl !Sync for HostCallback
impl Unpin for HostCallback
impl UnwindSafe for HostCallback
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more