pub struct Update<'alloc, 's> { /* private fields */ }Expand description
An in-progress render state update.
This token is returned by RenderState::begin_update and keeps the render
state borrowed until Self::end completes the deferred update work. This
makes it impossible to read from the render state while it is incomplete.
Implementations§
Source§impl<'alloc, 's> Update<'alloc, 's>
impl<'alloc, 's> Update<'alloc, 's>
Sourcepub fn end(self) -> Result<Snapshot<'alloc, 's>>
pub fn end(self) -> Result<Snapshot<'alloc, 's>>
Complete a prior RenderState::begin_update call by performing any deferred work.
This only reads and writes memory owned by the render state, so it is safe to call while the terminal is being modified. Consumes the update token and returns a snapshot that can be read to draw the frame.
Trait Implementations§
Auto Trait Implementations§
impl<'alloc, 's> !Send for Update<'alloc, 's>
impl<'alloc, 's> !Sync for Update<'alloc, 's>
impl<'alloc, 's> !UnwindSafe for Update<'alloc, 's>
impl<'alloc, 's> Freeze for Update<'alloc, 's>
impl<'alloc, 's> RefUnwindSafe for Update<'alloc, 's>
impl<'alloc, 's> Unpin for Update<'alloc, 's>
impl<'alloc, 's> UnsafeUnpin for Update<'alloc, 's>
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