Struct object::read::macho::MachOSegment
source · pub struct MachOSegment<'data, 'file, Mach, R = &'data [u8]>where
Mach: MachHeader,
R: ReadRef<'data>,{ /* private fields */ }
Expand description
A segment in a MachOFile
.
Most functionality is provided by the ObjectSegment
trait implementation.
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.
Auto Trait Implementations§
impl<'data, 'file, Mach, R> RefUnwindSafe for MachOSegment<'data, 'file, Mach, R>where
Mach: RefUnwindSafe,
R: RefUnwindSafe,
<Mach as MachHeader>::Endian: RefUnwindSafe,
<Mach as MachHeader>::Nlist: RefUnwindSafe,
<Mach as MachHeader>::Section: RefUnwindSafe,
<Mach as MachHeader>::Segment: RefUnwindSafe,
impl<'data, 'file, Mach, R> Send for MachOSegment<'data, 'file, Mach, R>where
Mach: Sync,
R: Sync,
<Mach as MachHeader>::Endian: Sync,
<Mach as MachHeader>::Nlist: Sync,
<Mach as MachHeader>::Section: Sync,
<Mach as MachHeader>::Segment: Sync,
impl<'data, 'file, Mach, R> Sync for MachOSegment<'data, 'file, Mach, R>where
Mach: Sync,
R: Sync,
<Mach as MachHeader>::Endian: Sync,
<Mach as MachHeader>::Nlist: Sync,
<Mach as MachHeader>::Section: Sync,
<Mach as MachHeader>::Segment: Sync,
impl<'data, 'file, Mach, R> Unpin for MachOSegment<'data, 'file, Mach, R>
impl<'data, 'file, Mach, R> UnwindSafe for MachOSegment<'data, 'file, Mach, R>where
Mach: RefUnwindSafe,
R: RefUnwindSafe,
<Mach as MachHeader>::Endian: RefUnwindSafe,
<Mach as MachHeader>::Nlist: RefUnwindSafe,
<Mach as MachHeader>::Section: RefUnwindSafe,
<Mach as MachHeader>::Segment: RefUnwindSafe,
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