Trait object::read::macho::Segment [−][src]
pub trait Segment: Debug + Pod { type Word: Into<u64>; type Endian: Endian; type Section: Section<Endian = Self::Endian>;}Show methods
fn from_command(
command: LoadCommandData<'_, Self::Endian>
) -> Result<Option<(&Self, &[u8])>>; fn cmd(&self, endian: Self::Endian) -> u32; fn cmdsize(&self, endian: Self::Endian) -> u32; fn segname(&self) -> &[u8; 16]; fn vmaddr(&self, endian: Self::Endian) -> Self::Word; fn vmsize(&self, endian: Self::Endian) -> Self::Word; fn fileoff(&self, endian: Self::Endian) -> Self::Word; fn filesize(&self, endian: Self::Endian) -> Self::Word; fn maxprot(&self, endian: Self::Endian) -> u32; fn initprot(&self, endian: Self::Endian) -> u32; fn nsects(&self, endian: Self::Endian) -> u32; fn flags(&self, endian: Self::Endian) -> u32; fn name(&self) -> &[u8] { ... } fn file_range(&self, endian: Self::Endian) -> (u64, u64) { ... } fn data<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
data: R
) -> Result<&'data [u8], ()> { ... } fn sections<'data, R: ReadRef<'data>>(
&self,
endian: Self::Endian,
section_data: R
) -> Result<&'data [Self::Section]> { ... }
Expand description
A trait for generic access to SegmentCommand32
and SegmentCommand64
.
Associated Types
Required methods
fn from_command(
command: LoadCommandData<'_, Self::Endian>
) -> Result<Option<(&Self, &[u8])>>
[src]
command: LoadCommandData<'_, Self::Endian>
) -> Result<Option<(&Self, &[u8])>>
fn cmd(&self, endian: Self::Endian) -> u32
[src]
fn cmdsize(&self, endian: Self::Endian) -> u32
[src]
fn segname(&self) -> &[u8; 16]
[src]
fn vmaddr(&self, endian: Self::Endian) -> Self::Word
[src]
fn vmsize(&self, endian: Self::Endian) -> Self::Word
[src]
fn fileoff(&self, endian: Self::Endian) -> Self::Word
[src]
fn filesize(&self, endian: Self::Endian) -> Self::Word
[src]
fn maxprot(&self, endian: Self::Endian) -> u32
[src]
fn initprot(&self, endian: Self::Endian) -> u32
[src]
fn nsects(&self, endian: Self::Endian) -> u32
[src]
fn flags(&self, endian: Self::Endian) -> u32
[src]
Provided methods
fn file_range(&self, endian: Self::Endian) -> (u64, u64)
[src]
fn file_range(&self, endian: Self::Endian) -> (u64, u64)
[src]Return the offset and size of the segment in the file.
Implementors
impl<Endian: Endian> Segment for SegmentCommand32<Endian>
[src]
impl<Endian: Endian> Segment for SegmentCommand32<Endian>
[src]type Word = u32
type Endian = Endian
type Section = Section32<Self::Endian>
fn from_command(
command: LoadCommandData<'_, Self::Endian>
) -> Result<Option<(&Self, &[u8])>>
[src]
command: LoadCommandData<'_, Self::Endian>
) -> Result<Option<(&Self, &[u8])>>
fn cmd(&self, endian: Self::Endian) -> u32
[src]
fn cmdsize(&self, endian: Self::Endian) -> u32
[src]
fn segname(&self) -> &[u8; 16]
[src]
fn vmaddr(&self, endian: Self::Endian) -> Self::Word
[src]
fn vmsize(&self, endian: Self::Endian) -> Self::Word
[src]
fn fileoff(&self, endian: Self::Endian) -> Self::Word
[src]
fn filesize(&self, endian: Self::Endian) -> Self::Word
[src]
fn maxprot(&self, endian: Self::Endian) -> u32
[src]
fn initprot(&self, endian: Self::Endian) -> u32
[src]
fn nsects(&self, endian: Self::Endian) -> u32
[src]
fn flags(&self, endian: Self::Endian) -> u32
[src]
impl<Endian: Endian> Segment for SegmentCommand64<Endian>
[src]
impl<Endian: Endian> Segment for SegmentCommand64<Endian>
[src]type Word = u64
type Endian = Endian
type Section = Section64<Self::Endian>
fn from_command(
command: LoadCommandData<'_, Self::Endian>
) -> Result<Option<(&Self, &[u8])>>
[src]
command: LoadCommandData<'_, Self::Endian>
) -> Result<Option<(&Self, &[u8])>>