pub struct FakeRenderer { /* private fields */ }Expand description
A seeded additive synth behind the Renderer trait.
Implementations§
Source§impl FakeRenderer
impl FakeRenderer
Sourcepub fn new(synth: Synth, seed: u64) -> Self
pub fn new(synth: Synth, seed: u64) -> Self
Builds a renderer that claims to be synth. Two renderers with one
seed give bit-identical renders in the same order.
Sourcepub fn with_patch(self, patch: FakePatch) -> Self
pub fn with_patch(self, patch: FakePatch) -> Self
Plays patch whatever state a job holds, as a plug-in that loads
any preset of its synth. The saved state is still the loaded one.
Sourcepub fn with_fault(self, at: u64, fault: Fault) -> Self
pub fn with_fault(self, at: u64, fault: Fault) -> Self
Injects fault into the render with index at, counted from 0.
Trait Implementations§
Source§impl Clone for FakeRenderer
impl Clone for FakeRenderer
Source§impl Debug for FakeRenderer
impl Debug for FakeRenderer
Source§impl Renderer for FakeRenderer
impl Renderer for FakeRenderer
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 Freeze for FakeRenderer
impl RefUnwindSafe for FakeRenderer
impl Send for FakeRenderer
impl Sync for FakeRenderer
impl Unpin for FakeRenderer
impl UnsafeUnpin for FakeRenderer
impl UnwindSafe for FakeRenderer
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> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
§impl<T> DowncastSync for T
impl<T> DowncastSync 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