pub struct PluginRenderer { /* private fields */ }Expand description
Plays jobs through one plug-in instance in a host process.
Implementations§
Source§impl PluginRenderer
impl PluginRenderer
Sourcepub fn start(
synth: Synth,
plugin: &Path,
host: &Path,
) -> Result<Self, RenderError>
pub fn start( synth: Synth, plugin: &Path, host: &Path, ) -> Result<Self, RenderError>
Starts the host at host and loads the plug-in at plugin as
synth.
§Errors
Returns RenderError::Host when the platform, the plug-in or the
host binary cannot render, and the host’s own errors.
Trait Implementations§
Source§impl Debug for PluginRenderer
impl Debug for PluginRenderer
Source§impl Drop for PluginRenderer
impl Drop for PluginRenderer
Source§impl Renderer for PluginRenderer
impl Renderer for PluginRenderer
Source§fn identity(&self) -> HostIdentity
fn identity(&self) -> HostIdentity
Returns what renders.
Source§fn render(&mut self, job: &RenderJob) -> Result<Rendered, RenderError>
fn render(&mut self, job: &RenderJob) -> Result<Rendered, RenderError>
Renders one job. Read more
Source§fn render_init(&mut self, job: &RenderJob) -> Result<Rendered, RenderError>
fn render_init(&mut self, job: &RenderJob) -> Result<Rendered, RenderError>
Renders the job’s notes with the plug-in’s own init patch: the job’s
state is not loaded. Only a renderer that has loaded no state yet
holds the init patch, so the load check calls this first. Read more
Source§fn last_state_load(&self) -> Option<Seconds>
fn last_state_load(&self) -> Option<Seconds>
Returns how long the state load of the last render took, when the
backend measures it. A render of the init patch loads no state.
Source§fn save_state(&mut self) -> Result<Vec<u8>, RenderError>
fn save_state(&mut self) -> Result<Vec<u8>, RenderError>
Returns the state the plug-in saves now. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for PluginRenderer
impl !Sync for PluginRenderer
impl !UnwindSafe for PluginRenderer
impl Freeze for PluginRenderer
impl Send for PluginRenderer
impl Unpin for PluginRenderer
impl UnsafeUnpin for PluginRenderer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more