Struct forth3::dictionary::OwnedDict

source ·
pub struct OwnedDict<T: 'static>(NonNull<Dictionary<T>>);
Expand description

A handle to an owned, mutable dictionary allocation.

Tuple Fields§

§0: NonNull<Dictionary<T>>

Implementations§

source§

impl<T: 'static> OwnedDict<T>

source

pub fn new<D: DropDict>( dict: NonNull<MaybeUninit<Dictionary<T>>>, size: usize, ) -> Self

source

fn into_shared(self) -> SharedDict<T>

source

pub(crate) fn fork_onto(&mut self, new: OwnedDict<T>) -> SharedDict<T>

We swap self to the new, empty OwnedDict, and turn the old self into a SharedDict, both as the parent of our new self, as well as returning it for other use.

source

pub(crate) fn set_parent(&mut self, parent: SharedDict<T>)

Methods from Deref<Target = Dictionary<T>>§

source

const MUTABLE: usize = 18_446_744_073_709_551_615usize

source

pub(crate) fn add_bi_fastr( &mut self, name: FaStr, bi: fn(_: &mut Forth<T>) -> Result<(), Error>, ) -> Result<(), BumpError>

source

pub(crate) fn build_entry(&mut self) -> Result<EntryBuilder<'_, T>, BumpError>

source

pub(crate) fn entries(&self) -> Entries<'_, T>

Trait Implementations§

source§

impl<T: 'static> Deref for OwnedDict<T>

§

type Target = Dictionary<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<T: 'static> DerefMut for OwnedDict<T>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<T: 'static> Drop for OwnedDict<T>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<T> Freeze for OwnedDict<T>

§

impl<T> RefUnwindSafe for OwnedDict<T>
where T: RefUnwindSafe,

§

impl<T> !Send for OwnedDict<T>

§

impl<T> !Sync for OwnedDict<T>

§

impl<T> Unpin for OwnedDict<T>

§

impl<T> UnwindSafe for OwnedDict<T>
where T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.