pub struct Elf { /* private fields */ }Expand description
An Elf file in the process image is a container for Sections
Implementations§
Source§impl Elf
impl Elf
Sourcepub fn path(&self) -> &Path
pub fn path(&self) -> &Path
The path to the underlying ELF file, this Elf struct was generated from
Sourcepub fn builder() -> ElfBuilder
pub fn builder() -> ElfBuilder
Create an ElfBuilder to create Elf files from scratch
Source§impl Elf
Accessor methods that handle the children of this process image element
impl Elf
Accessor methods that handle the children of this process image element
Sourcepub fn set_cursor(&mut self, cursor: usize)
pub fn set_cursor(&mut self, cursor: usize)
Set the cursor of this process image element
Sourcepub fn move_cursor_beyond_end(&mut self)
pub fn move_cursor_beyond_end(&mut self)
Move the cursor of this process image element to the end of its children list. This enables appending children.
Sourcepub fn move_cursor_forward(&mut self) -> bool
pub fn move_cursor_forward(&mut self) -> bool
Increment the cursor of this process image element or return false if the cursor
is already at the last child
Sourcepub fn move_cursor_backwards(&mut self) -> bool
pub fn move_cursor_backwards(&mut self) -> bool
Decrement the cursor of this process image element or return false if it’s already
at the first child
Sourcepub fn section(&self, id: Id) -> Option<&Section>
pub fn section(&self, id: Id) -> Option<&Section>
Retrieve the child with the given ID of this process image element
Sourcepub fn num_sections(&self) -> usize
pub fn num_sections(&self) -> usize
Get the number of children for this process image element
Sourcepub fn cursor_section(&self) -> Option<&Section>
pub fn cursor_section(&self) -> Option<&Section>
Get the child at the current cursor position for this process image element
Sourcepub fn cursor_section_mut(&mut self) -> Option<&mut Section>
pub fn cursor_section_mut(&mut self) -> Option<&mut Section>
Get the child at the current cursor position for this process image element
Sourcepub fn insert_section(&mut self, child: Section) -> Id
pub fn insert_section(&mut self, child: Section) -> Id
Insert the given child into the list of children at the current cursor position for this process image element
Sourcepub fn delete_section(&mut self) -> Section
pub fn delete_section(&mut self) -> Section
Delete the child at the current cursor position of this process image element and return it
Sourcepub fn iter_sections(&self) -> Iter<'_, Section> ⓘ
pub fn iter_sections(&self) -> Iter<'_, Section> ⓘ
Iterate over all children of this process image element independent of the current cursor position
Sourcepub fn iter_sections_mut(&mut self) -> IterMut<'_, Section> ⓘ
pub fn iter_sections_mut(&mut self) -> IterMut<'_, Section> ⓘ
Iterate over all children of this process image element independent of the current cursor position
Sourcepub fn section_mut(&mut self, id: Id) -> Option<&mut Section>
pub fn section_mut(&mut self, id: Id) -> Option<&mut Section>
Retrieve the child with the given ID of this process image element