pub struct DynamicAllocator;Expand description
A dynamically allocating Brainfuck allocator. If accessing an unallocated cell is attempted, the VM memory is expanded to be abble to support that cell.
Trait Implementations§
Source§impl BrainfuckAllocator for DynamicAllocator
impl BrainfuckAllocator for DynamicAllocator
Source§fn ensure_capacity<T: BrainfuckCell>(
data: &mut Vec<T>,
min_size: usize,
) -> Result<(), VMMemoryError>
fn ensure_capacity<T: BrainfuckCell>( data: &mut Vec<T>, min_size: usize, ) -> Result<(), VMMemoryError>
Ensures that
data has at least min_size cells available for
both reading and writing. If this function returns Result::Ok,
data[min_size - 1] can be safely read from and written to. Read moreAuto Trait Implementations§
impl Freeze for DynamicAllocator
impl RefUnwindSafe for DynamicAllocator
impl Send for DynamicAllocator
impl Sync for DynamicAllocator
impl Unpin for DynamicAllocator
impl UnwindSafe for DynamicAllocator
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