pub struct Vmem { /* private fields */ }Expand description
Representation of a VMEM file.
These files consist of sections which are runs of memory starting at some address.
Implementations§
Source§impl Vmem
impl Vmem
Sourcepub fn sections(&self) -> impl Iterator<Item = &Section>
pub fn sections(&self) -> impl Iterator<Item = &Section>
Returns an iterator over sections of the VMEM file.
Sourcepub fn dump(&self, bytes_per_word: Option<usize>, addr_per_word: bool) -> String
pub fn dump(&self, bytes_per_word: Option<usize>, addr_per_word: bool) -> String
Serialize the VMEM, dumping it to a string.
The bytes_per_word parameter can be used to control the zero-extension of words.
If addr_per_word is true, then each word will be given its own address on a
separate line, with a stride of bytes_per_word between words (default: 1). If it
is instead false, an address will only be emitted per each section.
Source§impl Vmem
impl Vmem
Sourcepub fn data_addrs(&self, stride: usize) -> impl Iterator<Item = Data> + '_
pub fn data_addrs(&self, stride: usize) -> impl Iterator<Item = Data> + '_
Returns an iterator over all data of the VMEM file.
The stride should either be 1 (one address per word) or the number of bytes in each word.
Sourcepub fn merge_sections(&mut self, addr_stride: Option<usize>)
pub fn merge_sections(&mut self, addr_stride: Option<usize>)
Merge any contiguous sections in the VMEM together.
Trait Implementations§
impl Eq for Vmem
impl StructuralPartialEq for Vmem
Auto Trait Implementations§
impl Freeze for Vmem
impl RefUnwindSafe for Vmem
impl Send for Vmem
impl Sync for Vmem
impl Unpin for Vmem
impl UnwindSafe for Vmem
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