pub struct DelaySink<'a> {
pub inner: &'a dyn EventSink,
pub delay: Duration,
}Expand description
Wraps an EventSink and injects a wall-time sleep after each
RoundCompleted event. Useful for making the deterministic sim
watchable in live mode — without this the cascade fires in
microseconds, faster than the live renderer’s frames can register
to a human eye.
Test/demo only. Inject this in production and you’ll add fake latency to real deploys.
Fields§
§inner: &'a dyn EventSink§delay: DurationTrait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for DelaySink<'a>
impl<'a> !UnwindSafe for DelaySink<'a>
impl<'a> Freeze for DelaySink<'a>
impl<'a> Send for DelaySink<'a>
impl<'a> Sync for DelaySink<'a>
impl<'a> Unpin for DelaySink<'a>
impl<'a> UnsafeUnpin for DelaySink<'a>
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