pub struct AdapterLoop<A> { /* private fields */ }Expand description
Device-rate loop over an already encoded Scene and a local adapter.
The loop is pure and deterministic. It has no runtime context, no
sim_lib_view::SurfaceCodec, and no route back to content encoding.
Implementations§
Source§impl<A> AdapterLoop<A>
impl<A> AdapterLoop<A>
Sourcepub fn new(adapter: A, policy: StalePolicy) -> Self
pub fn new(adapter: A, policy: StalePolicy) -> Self
Builds a loop for one adapter and staleness policy.
Sourcepub fn policy(&self) -> StalePolicy
pub fn policy(&self) -> StalePolicy
Returns the configured staleness policy.
Source§impl<A: LocalAdapter> AdapterLoop<A>
impl<A: LocalAdapter> AdapterLoop<A>
Sourcepub fn step(
&mut self,
clock: &FrameClock,
input: &AdapterInput<A::State>,
profile: &DeviceProfile,
) -> Result<Frame>
pub fn step( &mut self, clock: &FrameClock, input: &AdapterInput<A::State>, profile: &DeviceProfile, ) -> Result<Frame>
Advances the loop by one modeled frame.
Trait Implementations§
Source§impl<A: Clone> Clone for AdapterLoop<A>
impl<A: Clone> Clone for AdapterLoop<A>
Source§fn clone(&self) -> AdapterLoop<A>
fn clone(&self) -> AdapterLoop<A>
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 moreAuto Trait Implementations§
impl<A> !Send for AdapterLoop<A>
impl<A> !Sync for AdapterLoop<A>
impl<A> Freeze for AdapterLoop<A>where
A: Freeze,
impl<A> RefUnwindSafe for AdapterLoop<A>where
A: RefUnwindSafe,
impl<A> Unpin for AdapterLoop<A>where
A: Unpin,
impl<A> UnsafeUnpin for AdapterLoop<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for AdapterLoop<A>where
A: UnwindSafe,
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