pub struct FrameSlots { /* private fields */ }Expand description
The resolved register index of each field, or None for one the
program never mentions. Built once at load.
Implementations§
Source§impl FrameSlots
impl FrameSlots
Sourcepub fn resolve(index: &impl Fn(&str) -> Option<u16>) -> Self
pub fn resolve(index: &impl Fn(&str) -> Option<u16>) -> Self
Resolve every field against a roster.
Sourcepub fn seed(&self, state: &mut VmState)
pub fn seed(&self, state: &mut VmState)
Seed every field’s register with MilkDrop’s default, before the program runs.
Sourcepub fn read(&self, state: &VmState) -> FrameOutputs
pub fn read(&self, state: &VmState) -> FrameOutputs
Read every field back, converting the rates.
Both arms convert. A default is stated in the reference’s
vocabulary exactly as a program’s own value is — Default is
MilkDrop’s per-frame number, not this engine’s per-second one — so
an unnamed output that skipped convert would leave a per-frame
factor in a field whose doc says “per second”. That was
design-backlog 0121, and it silently ran an entire Plan 0109
experiment at 0.98/s instead of 0.5455/s.
Trait Implementations§
Source§impl Clone for FrameSlots
impl Clone for FrameSlots
Source§fn clone(&self) -> FrameSlots
fn clone(&self) -> FrameSlots
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FrameSlots
impl Debug for FrameSlots
Source§impl Default for FrameSlots
impl Default for FrameSlots
Source§fn default() -> FrameSlots
fn default() -> FrameSlots
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FrameSlots
impl RefUnwindSafe for FrameSlots
impl Send for FrameSlots
impl Sync for FrameSlots
impl Unpin for FrameSlots
impl UnsafeUnpin for FrameSlots
impl UnwindSafe for FrameSlots
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