Struct moore_vhdl::konst2::ConstArena
source · [−]pub struct ConstArena<'t> {
pub integer: Arena<IntegerConst<'t>>,
pub floating: Arena<FloatingConst<'t>>,
}
Expand description
An arena to allocate constant values into.
Fields
integer: Arena<IntegerConst<'t>>
floating: Arena<FloatingConst<'t>>
Implementations
sourceimpl<'t> ConstArena<'t>
impl<'t> ConstArena<'t>
sourcepub fn new() -> ConstArena<'t>
pub fn new() -> ConstArena<'t>
Create a new arena.
Trait Implementations
sourceimpl<'a, 't> Alloc<'a, 'a, FloatingConst<'t>> for ConstArena<'t> where
't: 'a,
impl<'a, 't> Alloc<'a, 'a, FloatingConst<'t>> for ConstArena<'t> where
't: 'a,
sourcefn alloc(&'a self, value: FloatingConst<'t>) -> &'a mut FloatingConst<'t>
fn alloc(&'a self, value: FloatingConst<'t>) -> &'a mut FloatingConst<'t>
Allocate a value of type T
.
sourceimpl<'a, 't> Alloc<'a, 'a, IntegerConst<'t>> for ConstArena<'t> where
't: 'a,
impl<'a, 't> Alloc<'a, 'a, IntegerConst<'t>> for ConstArena<'t> where
't: 'a,
sourcefn alloc(&'a self, value: IntegerConst<'t>) -> &'a mut IntegerConst<'t>
fn alloc(&'a self, value: IntegerConst<'t>) -> &'a mut IntegerConst<'t>
Allocate a value of type T
.
sourceimpl<'t> AllocOwned<'t, 't, dyn Const2<'t> + 't> for ConstArena<'t>
impl<'t> AllocOwned<'t, 't, dyn Const2<'t> + 't> for ConstArena<'t>
sourcefn alloc_owned(&'t self, value: OwnedConst<'t>) -> &'t dyn Const2<'t>
fn alloc_owned(&'t self, value: OwnedConst<'t>) -> &'t dyn Const2<'t>
Allocate a value of type T: ToOwned
into this arena. Read more
sourcefn maybe_alloc(&'a self, value: Cow<'t, T>) -> &'t T
fn maybe_alloc(&'a self, value: Cow<'t, T>) -> &'t T
Conditionally allocate a value of type Cow<T>
. Read more
sourcefn force_alloc(&'a self, value: Cow<'_, T>) -> &'t T
fn force_alloc(&'a self, value: Cow<'_, T>) -> &'t T
Forcefully allocate a value of type Cow<T>
. Read more
sourceimpl<'t> Default for ConstArena<'t>
impl<'t> Default for ConstArena<'t>
sourcefn default() -> ConstArena<'t>
fn default() -> ConstArena<'t>
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<'t> !RefUnwindSafe for ConstArena<'t>
impl<'t> !Send for ConstArena<'t>
impl<'t> !Sync for ConstArena<'t>
impl<'t> Unpin for ConstArena<'t>
impl<'t> !UnwindSafe for ConstArena<'t>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more