Struct forth3::dictionary::SharedDict
source · pub(crate) struct SharedDict<T: 'static>(NonNull<Dictionary<T>>);
Expand description
A handle to a shared, atomically reference counted dictionary allocation.
The contents of this dictionary are frozen and can no longer be mutated.
However, a SharedDict
can be inexpensively cloned by incrementing its
reference count.
When a VM is forked into a child VM, its current OwnedDict
is
transformed into a SharedDict
, which both its new OwnedDict
and the
child VM’s OwnedDict
will reference as their parents.
Tuple Fields§
§0: NonNull<Dictionary<T>>
Implementations§
const MAX_REFCOUNT: usize = 18_446_744_073_709_551_614usize
unsafe fn drop_slow(&mut self)
Methods from Deref<Target = Dictionary<T>>§
const MUTABLE: usize = 18_446_744_073_709_551_615usize
pub(crate) fn entries(&self) -> Entries<'_, T> ⓘ
Trait Implementations§
Auto Trait Implementations§
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)