pub struct ThreadLocalArena;Expand description
Thread-local BTreeMap-based arena.
This provides the lowest overhead for protection operations by eliminating RefCell borrow checking.
Trait Implementations§
Source§impl ThreadLocalArenaOps for ThreadLocalArena
impl ThreadLocalArenaOps for ThreadLocalArena
Source§fn with_state<R, F: FnOnce(&mut ThreadLocalState<BTreeMap<usize, Entry>>) -> R>(
f: F,
) -> R
fn with_state<R, F: FnOnce(&mut ThreadLocalState<BTreeMap<usize, Entry>>) -> R>( f: F, ) -> R
Access the thread-local state. Read more
Source§unsafe fn init()
unsafe fn init()
Initialize the arena with default capacity (called automatically on first use). Read more
Source§unsafe fn init_with_capacity(capacity: usize)
unsafe fn init_with_capacity(capacity: usize)
Initialize the arena with specific capacity. Read more
Source§unsafe fn protect(x: SEXP) -> SEXP
unsafe fn protect(x: SEXP) -> SEXP
Protect a SEXP, incrementing its reference count. Read more
Source§unsafe fn unprotect_fast(x: SEXP)
unsafe fn unprotect_fast(x: SEXP)
Unprotect without checking initialization. Read more
Source§unsafe fn try_unprotect_fast(x: SEXP) -> bool
unsafe fn try_unprotect_fast(x: SEXP) -> bool
Try to unprotect without checking initialization. Read more
Source§fn is_protected(x: SEXP) -> bool
fn is_protected(x: SEXP) -> bool
Check if a SEXP is protected.
Auto Trait Implementations§
impl Freeze for ThreadLocalArena
impl RefUnwindSafe for ThreadLocalArena
impl Send for ThreadLocalArena
impl Sync for ThreadLocalArena
impl Unpin for ThreadLocalArena
impl UnsafeUnpin for ThreadLocalArena
impl UnwindSafe for ThreadLocalArena
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