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
}
Expand description

Generalized 32/64 bit Segment Command

Fields

cmd: u32cmdsize: u32segname: [u8; 16]vmaddr: u64vmsize: u64fileoff: u64filesize: u64maxprot: u32initprot: u32nsects: u32flags: u32data: &'a [u8]

Implementations

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.

Get the name of this segment

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

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

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

Trait Implementations

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.