pub type MachOSegment32<'data, 'file, Endian = Endianness, R = &'data [u8]> = MachOSegment<'data, 'file, MachHeader32<Endian>, R>;
Expand description
A segment in a MachOFile32
.
Aliased Type§
struct MachOSegment32<'data, 'file, Endian = Endianness, R = &'data [u8]> {
file: &'file MachOFile<'data, MachHeader32<Endian>, R>,
internal: &'file MachOSegmentInternal<'data, MachHeader32<Endian>, R>,
}
Fields§
§file: &'file MachOFile<'data, MachHeader32<Endian>, R>
§internal: &'file MachOSegmentInternal<'data, MachHeader32<Endian>, R>
Implementations
Source§impl<'data, 'file, Mach, R> MachOSegment<'data, 'file, Mach, R>where
Mach: MachHeader,
R: ReadRef<'data>,
impl<'data, 'file, Mach, R> MachOSegment<'data, 'file, Mach, R>where
Mach: MachHeader,
R: ReadRef<'data>,
Sourcepub fn macho_file(&self) -> &'file MachOFile<'data, Mach, R>
pub fn macho_file(&self) -> &'file MachOFile<'data, Mach, R>
Get the Mach-O file containing this segment.
Sourcepub fn macho_segment(&self) -> &'data Mach::Segment
pub fn macho_segment(&self) -> &'data Mach::Segment
Get the raw Mach-O segment structure.
fn bytes(&self) -> Result<&'data [u8]>
Trait Implementations
Source§impl<'data, 'file, Mach, R> Debug for MachOSegment<'data, 'file, Mach, R>
impl<'data, 'file, Mach, R> Debug for MachOSegment<'data, 'file, Mach, R>
Source§impl<'data, 'file, Mach, R> ObjectSegment<'data> for MachOSegment<'data, 'file, Mach, R>where
Mach: MachHeader,
R: ReadRef<'data>,
impl<'data, 'file, Mach, R> ObjectSegment<'data> for MachOSegment<'data, 'file, Mach, R>where
Mach: MachHeader,
R: ReadRef<'data>,
Source§fn file_range(&self) -> (u64, u64)
fn file_range(&self) -> (u64, u64)
Returns the offset and size of the segment in the file.
Source§fn data(&self) -> Result<&'data [u8]>
fn data(&self) -> Result<&'data [u8]>
Returns a reference to the file contents of the segment. Read more
Source§fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>>
fn data_range(&self, address: u64, size: u64) -> Result<Option<&'data [u8]>>
Return the segment data in the given range. Read more
Source§fn flags(&self) -> SegmentFlags
fn flags(&self) -> SegmentFlags
Return the flags of segment.