pub struct RenderJob { /* private fields */ }Expand description
One farm result: a render + vet + featurize that happened with no
Engine anywhere in sight.
This is the whole farm-worker contract. A farm worker holds a wasm instance
and nothing else — no pool, no RNG, no session — so any worker is
interchangeable with any other and with the engine itself. samples is
moved out on the first read so the buffer can be transferred rather than
copied.
Implementations§
Source§impl RenderJob
impl RenderJob
Sourcepub fn ok(&self) -> bool
pub fn ok(&self) -> bool
Whether the term rendered and passed vetting. A false here is a
normal outcome — a quarantined draw — not an error to report.
Sourcepub fn cached(&self) -> String
pub fn cached(&self) -> String
Serialized auracle_features::CachedFeatures: the content key, the
raw φ and vet report, the note onsets and the render length. "" when
!ok.
Sourcepub fn take_samples(&mut self) -> Vec<f32>
pub fn take_samples(&mut self) -> Vec<f32>
The normalized audition as f32, emptying the job.
f32 is not a precision compromise: a stored render is only ever
consumed through this boundary (render_of, edit_render), and the
engine measures φ on the f64 render inside the farm worker, before this
conversion. See auracle_features::Audition’s one-way-door note.
Sourcepub fn n_samples(&self) -> usize
pub fn n_samples(&self) -> usize
Number of samples still held (0 after RenderJob::take_samples).
Trait Implementations§
Source§impl FromWasmAbi for RenderJob
impl FromWasmAbi for RenderJob
Source§impl IntoWasmAbi for RenderJob
impl IntoWasmAbi for RenderJob
Source§impl LongRefFromWasmAbi for RenderJob
impl LongRefFromWasmAbi for RenderJob
Source§impl OptionFromWasmAbi for RenderJob
impl OptionFromWasmAbi for RenderJob
Source§impl OptionIntoWasmAbi for RenderJob
impl OptionIntoWasmAbi for RenderJob
Source§impl RefFromWasmAbi for RenderJob
impl RefFromWasmAbi for RenderJob
Source§type Abi = WasmPtr<WasmRefCell<RenderJob>>
type Abi = WasmPtr<WasmRefCell<RenderJob>>
Self are recovered from.Source§impl RefMutFromWasmAbi for RenderJob
impl RefMutFromWasmAbi for RenderJob
Source§impl TryFromJsValue for RenderJob
impl TryFromJsValue for RenderJob
Source§impl VectorFromWasmAbi for RenderJob
impl VectorFromWasmAbi for RenderJob
Source§impl VectorIntoWasmAbi for RenderJob
impl VectorIntoWasmAbi for RenderJob
impl SupportsConstructor for RenderJob
impl SupportsInstanceProperty for RenderJob
impl SupportsStaticProperty for RenderJob
Auto Trait Implementations§
impl Freeze for RenderJob
impl RefUnwindSafe for RenderJob
impl Send for RenderJob
impl Sync for RenderJob
impl Unpin for RenderJob
impl UnsafeUnpin for RenderJob
impl UnwindSafe for RenderJob
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
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.