pub struct ArenaCheckpoint {
pub watermark: usize,
}Expand description
A savepoint that can be used to roll back an arena to a prior state.
Fields§
§watermark: usizeThe watermark position at checkpoint time.
Implementations§
Source§impl ArenaCheckpoint
impl ArenaCheckpoint
Sourcepub fn create(arena: &LinearArena) -> Self
pub fn create(arena: &LinearArena) -> Self
Creates a checkpoint at the current position in arena.
Sourcepub fn restore(self, arena: &mut LinearArena)
pub fn restore(self, arena: &mut LinearArena)
Rolls back arena to this checkpoint.
Auto Trait Implementations§
impl Freeze for ArenaCheckpoint
impl RefUnwindSafe for ArenaCheckpoint
impl Send for ArenaCheckpoint
impl Sync for ArenaCheckpoint
impl Unpin for ArenaCheckpoint
impl UnsafeUnpin for ArenaCheckpoint
impl UnwindSafe for ArenaCheckpoint
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