Struct goblin::mach::segment::Segment [] [src]

pub struct Segment<'a> {
    pub cmd: u32,
    pub cmdsize: u32,
    pub segname: [u8; 16],
    pub vmaddr: u64,
    pub vmsize: u64,
    pub fileoff: u64,
    pub filesize: u64,
    pub maxprot: u32,
    pub initprot: u32,
    pub nsects: u32,
    pub flags: u32,
    pub data: &'a [u8],
    // some fields omitted
}

Generalized 32/64 bit Segment Command

Fields

Methods

impl<'a> Segment<'a>
[src]

[src]

Create a new, blank segment, with cmd either LC_SEGMENT_64, or LC_SEGMENT, depending on ctx. NB You are responsible for providing a correctly marshalled byte array as the sections. You should not use this for anything other than writing.

[src]

Get the name of this segment

[src]

Get the sections from this segment, erroring if any section couldn't be retrieved

[src]

Convert the raw C 32-bit segment command to a generalized version

[src]

Convert the raw C 64-bit segment command to a generalized version

Trait Implementations

impl<'a, 'b> IntoIterator for &'b Segment<'a>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl<'a> From<Segment<'a>> for SegmentCommand64
[src]

[src]

Performs the conversion.

impl<'a> From<Segment<'a>> for SegmentCommand32
[src]

[src]

Performs the conversion.

impl<'a> Debug for Segment<'a>
[src]

[src]

Formats the value using the given formatter. Read more

impl<'a> SizeWith<Ctx> for Segment<'a>
[src]

[src]

impl<'a> TryIntoCtx<Ctx> for Segment<'a>
[src]

[src]

impl<'a> IntoCtx<Ctx> for Segment<'a>
[src]

[src]

Auto Trait Implementations

impl<'a> Send for Segment<'a>

impl<'a> Sync for Segment<'a>