Struct minidump_writer::mem_writer::MemoryArrayWriter
source · pub struct MemoryArrayWriter<T> {
pub position: MDRVA,
/* private fields */
}
Fields§
§position: MDRVA
Implementations§
source§impl<T> MemoryArrayWriter<T>
impl<T> MemoryArrayWriter<T>
pub fn alloc_from_array( buffer: &mut Buffer, array: &[T], ) -> Result<Self, MemoryWriterError>
source§impl<T> MemoryArrayWriter<T>
impl<T> MemoryArrayWriter<T>
sourcepub fn alloc_from_iter<I>(
buffer: &mut Buffer,
iter: impl IntoIterator<Item = T, IntoIter = I>,
) -> Result<Self, MemoryWriterError>where
I: ExactSizeIterator<Item = T>,
pub fn alloc_from_iter<I>(
buffer: &mut Buffer,
iter: impl IntoIterator<Item = T, IntoIter = I>,
) -> Result<Self, MemoryWriterError>where
I: ExactSizeIterator<Item = T>,
Create a slot for a type T in the buffer, we can fill in the values in one go.
sourcepub fn alloc_array(
buffer: &mut Buffer,
array_size: usize,
) -> Result<Self, MemoryWriterError>
pub fn alloc_array( buffer: &mut Buffer, array_size: usize, ) -> Result<Self, MemoryWriterError>
Create a slot for a type T in the buffer, we can fill later with real values.
This function fills it with Default::default()
, which is less performant than
using uninitialized memory, but safe.
sourcepub fn set_value_at(
&mut self,
buffer: &mut Buffer,
val: T,
index: usize,
) -> Result<(), MemoryWriterError>
pub fn set_value_at( &mut self, buffer: &mut Buffer, val: T, index: usize, ) -> Result<(), MemoryWriterError>
Write actual values in the buffer-slot we got during alloc()
pub fn location(&self) -> MDLocationDescriptor
pub fn location_of_index(&self, idx: usize) -> MDLocationDescriptor
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for MemoryArrayWriter<T>
impl<T> RefUnwindSafe for MemoryArrayWriter<T>where
T: RefUnwindSafe,
impl<T> Send for MemoryArrayWriter<T>where
T: Send,
impl<T> Sync for MemoryArrayWriter<T>where
T: Sync,
impl<T> Unpin for MemoryArrayWriter<T>where
T: Unpin,
impl<T> UnwindSafe for MemoryArrayWriter<T>where
T: UnwindSafe,
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