[−][src]Trait object::read::macho::Segment
A trait for generic access to SegmentCommand32
and SegmentCommand64
.
Associated Types
Loading content...Required methods
pub fn from_command(
command: MachOLoadCommand<'_, Self::Endian>
) -> Result<Option<(&Self, Bytes<'_>)>>
[src]
command: MachOLoadCommand<'_, Self::Endian>
) -> Result<Option<(&Self, Bytes<'_>)>>
pub fn cmd(&self, endian: Self::Endian) -> u32
[src]
pub fn cmdsize(&self, endian: Self::Endian) -> u32
[src]
pub fn segname(&self) -> &[u8; 16]
[src]
pub fn vmaddr(&self, endian: Self::Endian) -> Self::Word
[src]
pub fn vmsize(&self, endian: Self::Endian) -> Self::Word
[src]
pub fn fileoff(&self, endian: Self::Endian) -> Self::Word
[src]
pub fn filesize(&self, endian: Self::Endian) -> Self::Word
[src]
pub fn maxprot(&self, endian: Self::Endian) -> u32
[src]
pub fn initprot(&self, endian: Self::Endian) -> u32
[src]
pub fn nsects(&self, endian: Self::Endian) -> u32
[src]
pub fn flags(&self, endian: Self::Endian) -> u32
[src]
Provided methods
pub fn name(&self) -> &[u8]
[src]
Return the segname
bytes up until the null terminator.
pub fn file_range(&self, endian: Self::Endian) -> (u64, u64)
[src]
Return the offset and size of the segment in the file.
pub fn data<'data>(
&self,
endian: Self::Endian,
data: Bytes<'data>
) -> Result<Bytes<'data>, ()>
[src]
&self,
endian: Self::Endian,
data: Bytes<'data>
) -> Result<Bytes<'data>, ()>
Get the segment data from the file data.
Returns Err
for invalid values.
pub fn sections<'data>(
&self,
endian: Self::Endian,
data: Bytes<'data>
) -> Result<&'data [Self::Section]>
[src]
&self,
endian: Self::Endian,
data: Bytes<'data>
) -> Result<&'data [Self::Section]>
Get the array of sections from the data following the segment command.
Returns Err
for invalid values.
Implementors
impl<Endian: Endian> Segment for SegmentCommand32<Endian>
[src]
type Word = u32
type Endian = Endian
type Section = Section32<Self::Endian>
pub fn from_command(
command: MachOLoadCommand<'_, Self::Endian>
) -> Result<Option<(&Self, Bytes<'_>)>>
[src]
command: MachOLoadCommand<'_, Self::Endian>
) -> Result<Option<(&Self, Bytes<'_>)>>
pub fn cmd(&self, endian: Self::Endian) -> u32
[src]
pub fn cmdsize(&self, endian: Self::Endian) -> u32
[src]
pub fn segname(&self) -> &[u8; 16]
[src]
pub fn vmaddr(&self, endian: Self::Endian) -> Self::Word
[src]
pub fn vmsize(&self, endian: Self::Endian) -> Self::Word
[src]
pub fn fileoff(&self, endian: Self::Endian) -> Self::Word
[src]
pub fn filesize(&self, endian: Self::Endian) -> Self::Word
[src]
pub fn maxprot(&self, endian: Self::Endian) -> u32
[src]
pub fn initprot(&self, endian: Self::Endian) -> u32
[src]
pub fn nsects(&self, endian: Self::Endian) -> u32
[src]
pub fn flags(&self, endian: Self::Endian) -> u32
[src]
impl<Endian: Endian> Segment for SegmentCommand64<Endian>
[src]
type Word = u64
type Endian = Endian
type Section = Section64<Self::Endian>
pub fn from_command(
command: MachOLoadCommand<'_, Self::Endian>
) -> Result<Option<(&Self, Bytes<'_>)>>
[src]
command: MachOLoadCommand<'_, Self::Endian>
) -> Result<Option<(&Self, Bytes<'_>)>>