Trait Alloc

Source
pub trait Alloc<'a, 't, T: 't> {
    // Required method
    fn alloc(&'a self, value: T) -> &'t mut T;
}
Expand description

Allocates values.

Required Methods§

Source

fn alloc(&'a self, value: T) -> &'t mut T

Allocate a value of type T.

Trait Implementations§

Source§

impl<'z, 'a, 'p: 'a, 't, T: 't> Alloc<'z, 't, T> for &'p dyn Alloc<'a, 't, T>

Source§

fn alloc(&'z self, value: T) -> &'t mut T

Allocate a value of type T.
Source§

impl<'a, 't, T: ToOwned<Owned = T> + 't> AllocOwned<'a, 't, T> for dyn Alloc<'a, 't, T>

Source§

fn alloc_owned(&'a self, value: T) -> &'t T

Allocate a value of type T: ToOwned into this arena. Read more
Source§

fn maybe_alloc(&'a self, value: Cow<'t, T>) -> &'t T

Conditionally allocate a value of type Cow<T>. Read more
Source§

fn force_alloc(&'a self, value: Cow<'_, T>) -> &'t T

Forcefully allocate a value of type Cow<T>. Read more

Implementors§

Source§

impl<'z, 'a, 'p: 'a, 't, T: 't> Alloc<'z, 't, T> for &'p dyn Alloc<'a, 't, T>