Struct expry::memorypool::MemoryScope
source · pub struct MemoryScope<'c> { /* private fields */ }
Implementations§
source§impl<'c> MemoryScope<'c>
impl<'c> MemoryScope<'c>
pub fn rewind(&mut self) -> MemoryScope<'_>
pub fn clear(&mut self) -> MemoryScope<'_>
pub fn alloc<'b, T>(&mut self, count: usize) -> &'b mut [MaybeUninit<T>]where 'c: 'b,
pub unsafe fn slice_assume_init_mut<T>(slice: &mut [MaybeUninit<T>]) -> &mut [T]
pub fn copy_u8<'b>(&mut self, bytes: &[u8]) -> &'b mut [u8] ⓘwhere 'c: 'b,
pub fn concat_u8<'b>(&mut self, chunks: &[&[u8]]) -> &'b mut [u8] ⓘwhere 'c: 'b,
pub fn join_str<'b>(&mut self, chunks: &[&str], glue: &str) -> &'b mut strwhere 'c: 'b,
pub fn concat_str<'b>(&mut self, chunks: &[&str]) -> &'b mut strwhere 'c: 'b,
pub fn copy_str<'b>(&mut self, str: &str) -> &'b mut strwhere 'c: 'b,
pub fn copy_hex<'b>(&mut self, s: &[u8]) -> &'b mut strwhere 'c: 'b,
pub fn copy_unhex<'b>( &mut self, s: &[u8] ) -> Result<&'b mut [u8], EncodingError>where 'c: 'b,
pub fn copy_with_replacement<'b>( &mut self, str: &'b [u8], replace: fn(_: u8) -> Option<&'static [u8]> ) -> &'b [u8] ⓘwhere 'c: 'b,
pub fn copy_with_dynamic_replacement<'b>( &mut self, str: &'b [u8], replace: ReplaceFn ) -> &'b [u8] ⓘwhere 'c: 'b,
sourcepub fn copy_object<'b, T>(&mut self, object: &T) -> &'b mut Twhere
T: Copy,
'c: 'b,
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
sourcepub fn move_object<'b, T>(&mut self, object: T) -> &'b mut Twhere
T: 'b,
'c: 'b,
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