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 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
pub fn write_fmt<'b>(&mut self, args: Arguments<'_>) -> &'b strwhere
'c: 'b,
pub fn slice_from_iter<'b, I: Iterator<Item = T>, T: Unpin>(
&mut self,
iter: I
) -> &'b mut [T]where
'c: 'b,
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§
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> 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