pub struct CurrentFrame<B: Backend> { /* private fields */ }Expand description
Resource holding the frame acquired at the start of each render tick.
Populated by RenderPlugin
during PreRender and consumed during
PostRender. Check
is_active before attempting to render.
Implementations§
Source§impl<B: Backend> CurrentFrame<B>
impl<B: Backend> CurrentFrame<B>
Sourcepub fn active(&mut self) -> Option<ActiveFrame<'_, B>>
pub fn active(&mut self) -> Option<ActiveFrame<'_, B>>
Returns a deref-able handle to the active frame, or None if no frame
is active this tick. Unlike accessing Self::Frame directly, methods
called through the returned ActiveFrame (via Deref/DerefMut) are
guaranteed safe to call — there is no way to construct an ActiveFrame
without an active frame existing.
Auto Trait Implementations§
impl<B> Freeze for CurrentFrame<B>
impl<B> RefUnwindSafe for CurrentFrame<B>
impl<B> Send for CurrentFrame<B>
impl<B> Sync for CurrentFrame<B>
impl<B> Unpin for CurrentFrame<B>
impl<B> UnsafeUnpin for CurrentFrame<B>
impl<B> UnwindSafe for CurrentFrame<B>
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