pub struct MemoryScope<'c> { /* private fields */ }

Implementations§

source§

impl<'c> MemoryScope<'c>

source

pub fn rewind(&mut self) -> MemoryScope<'_>

source

pub fn clear(&mut self) -> MemoryScope<'_>

source

pub fn alloc<'b, T>(&mut self, count: usize) -> &'b mut [MaybeUninit<T>]where 'c: 'b,

source

pub unsafe fn slice_assume_init_mut<T>(slice: &mut [MaybeUninit<T>]) -> &mut [T]

source

pub fn copy_u8<'b>(&mut self, bytes: &[u8]) -> &'b mut [u8] where 'c: 'b,

source

pub fn concat_u8<'b>(&mut self, chunks: &[&[u8]]) -> &'b mut [u8] where 'c: 'b,

source

pub fn join_str<'b>(&mut self, chunks: &[&str], glue: &str) -> &'b mut strwhere 'c: 'b,

source

pub fn concat_str<'b>(&mut self, chunks: &[&str]) -> &'b mut strwhere 'c: 'b,

source

pub fn copy_str<'b>(&mut self, str: &str) -> &'b mut strwhere 'c: 'b,

source

pub fn copy_hex<'b>(&mut self, s: &[u8]) -> &'b mut strwhere 'c: 'b,

source

pub fn copy_unhex<'b>( &mut self, s: &[u8] ) -> Result<&'b mut [u8], EncodingError>where 'c: 'b,

source

pub fn copy_with_replacement<'b>( &mut self, str: &'b [u8], replace: fn(_: u8) -> Option<&'static [u8]> ) -> &'b [u8] where 'c: 'b,

source

pub fn copy_with_dynamic_replacement<'b>( &mut self, str: &'b [u8], replace: ReplaceFn ) -> &'b [u8] where 'c: 'b,

source

pub fn copy_object<'b, T>(&mut self, object: &T) -> &'b mut Twhere T: Copy, 'c: 'b,

Copies objects without a destructor in the memory pool

source

pub fn move_object<'b, T>(&mut self, object: T) -> &'b mut Twhere T: 'b, 'c: 'b,

Copies objects without a destructor in the memory pool

source

pub fn write_fmt<'b>(&mut self, args: Arguments<'_>) -> &'b strwhere 'c: 'b,

source

pub fn slice_from_iter<'b, I: Iterator<Item = T>, T: Unpin>( &mut self, iter: I ) -> &'b mut [T]where 'c: 'b,

source

pub fn slice_from_array<'b, T: Unpin + Default, const N: usize>( &mut self, array: [T; N], range: Range<usize> ) -> &'b mut [T]where 'c: 'b,

Trait Implementations§

source§

impl<'c> Drop for MemoryScope<'c>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'c> RefUnwindSafe for MemoryScope<'c>

§

impl<'c> !Send for MemoryScope<'c>

§

impl<'c> !Sync for MemoryScope<'c>

§

impl<'c> Unpin for MemoryScope<'c>

§

impl<'c> !UnwindSafe for MemoryScope<'c>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere 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 Twhere 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.