Skip to main content

RenderReceiver

Struct RenderReceiver 

Source
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>

Source

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.

Source

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.

Source

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: Debug, W: Debug> Debug for RenderReceiver<S, W>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S, W> Drop for RenderReceiver<S, W>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl<S, W> Freeze for RenderReceiver<S, W>
where Arc<Channel<S, W>>: Freeze,

§

impl<S, W> RefUnwindSafe for RenderReceiver<S, W>
where Arc<Channel<S, W>>: RefUnwindSafe,

§

impl<S, W> Send for RenderReceiver<S, W>
where Arc<Channel<S, W>>: Send,

§

impl<S, W> Sync for RenderReceiver<S, W>
where Arc<Channel<S, W>>: Sync,

§

impl<S, W> Unpin for RenderReceiver<S, W>
where Arc<Channel<S, W>>: Unpin,

§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> StorageAccess<T> for T

Source§

fn as_borrowed(&self) -> &T

Borrows the value.
Source§

fn into_taken(self) -> T

Takes the value.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.