Trait rustep::format::elf::ElfFormat
[−]
[src]
pub trait ElfFormat { fn header(&self) -> &ElfHeader; fn segments(&self) -> Vec<&ElfSegment>; fn sections(&self) -> Vec<&ElfSection>; fn section(&self, name: &str) -> Option<&ElfSection> { ... } }
A trait representing the supported methods for a parsed ELF format.
This is used as universal interface for Elf file format, some methods are useful when using
those ignoring the 32 or 64 part. The information provided by ELF
header can be extracted
from the ElfHeader
trait object which can be gained from header()
method.
Required Methods
fn header(&self) -> &ElfHeader
Get trait object of header
fn segments(&self) -> Vec<&ElfSegment>
all segments trait objects
fn sections(&self) -> Vec<&ElfSection>
all sections trait objects
Provided Methods
fn section(&self, name: &str) -> Option<&ElfSection>
get some specific section with a given name
Trait Implementations
impl<'a> TryFrom<&'a Executable<'a>> for &'a ElfFormat
[src]
type Error = Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: &'a Executable) -> Result<&'a ElfFormat, Error>
[src]
🔬 This is a nightly-only experimental API. (
try_from
)Tries to convert an Executable
reference to an
ElfFormat
trait object