pub struct Mark(/* private fields */);Expand description
A saved top of a Scratch arena, to return to with
Scratch::reset. Marks compare equal when they
save the same top.
§Examples
use implicit_predicates_core::Scratch;
let mut buf = [0.0; 4];
let mut scratch = Scratch::borrowed(&mut buf);
let mark = scratch.mark();
scratch.push(&[1.0])?;
assert_ne!(scratch.mark(), mark);
scratch.reset(mark);
assert_eq!(scratch.mark(), mark);
assert_eq!(scratch.used(), 0);Trait Implementations§
impl Copy for Mark
impl Eq for Mark
impl StructuralPartialEq for Mark
Auto Trait Implementations§
impl Forget for Mark
impl Freeze for Mark
impl Move for Mark
impl RefUnwindSafe for Mark
impl Send for Mark
impl Sync for Mark
impl Unpin for Mark
impl UnsafeUnpin for Mark
impl UnwindSafe for Mark
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