pub struct RenderReceiver<S, W> { /* private fields */ }Expand description
The render-thread handle to the render channel: the
single wait point (Self::wait_next) draining pending commands plus the
freshest scene each wakeup.
Implementations§
Source§impl<S, W> RenderReceiver<S, W>
impl<S, W> RenderReceiver<S, W>
Sourcepub fn wait_next(&self) -> RenderBatch<S, W>
pub fn wait_next(&self) -> RenderBatch<S, W>
Block until there is work — a pending command, a fresh scene, or a
RenderSender disconnection — then drain it into one RenderBatch.
The render thread’s single wait point.
Sourcepub fn try_next(&self) -> RenderBatch<S, W>
pub fn try_next(&self) -> RenderBatch<S, W>
Drain any pending commands + the freshest scene without blocking — for a render loop that also polls its own timers/vsync. Returns an empty, non-disconnected batch when nothing is pending and the sender is alive.
Sourcepub fn dropped_frames(&self) -> u64
pub fn dropped_frames(&self) -> u64
The running count of scenes dropped by the latest-wins slot (replaced before the render thread took them) — a diagnostic for how far the render thread is falling behind the UI thread.
Trait Implementations§
Source§impl<S, W> Drop for RenderReceiver<S, W>
impl<S, W> Drop for RenderReceiver<S, W>
Auto Trait Implementations§
impl<S, W> Freeze for RenderReceiver<S, W>
impl<S, W> RefUnwindSafe for RenderReceiver<S, W>where
Arc<Channel<S, W>>: RefUnwindSafe,
impl<S, W> Send for RenderReceiver<S, W>
impl<S, W> Sync for RenderReceiver<S, W>
impl<S, W> Unpin for RenderReceiver<S, W>
impl<S, W> UnsafeUnpin for RenderReceiver<S, W>where
Arc<Channel<S, W>>: UnsafeUnpin,
impl<S, W> UnwindSafe for RenderReceiver<S, W>where
Arc<Channel<S, W>>: 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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.