pub struct ThreadLocalHashArena;Expand description
Thread-local HashMap-based arena.
Combines HashMap’s performance for large collections with thread-local storage’s low overhead.
Trait Implementations§
Source§impl ThreadLocalArenaOps for ThreadLocalHashArena
impl ThreadLocalArenaOps for ThreadLocalHashArena
Source§fn with_state<R, F: FnOnce(&mut ThreadLocalState<HashMap<usize, Entry>>) -> R>(
f: F,
) -> R
fn with_state<R, F: FnOnce(&mut ThreadLocalState<HashMap<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 ThreadLocalHashArena
impl RefUnwindSafe for ThreadLocalHashArena
impl Send for ThreadLocalHashArena
impl Sync for ThreadLocalHashArena
impl Unpin for ThreadLocalHashArena
impl UnsafeUnpin for ThreadLocalHashArena
impl UnwindSafe for ThreadLocalHashArena
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