Trait object::read::macho::FatArch

source ·
pub trait FatArch: Pod {
    type Word: Into<u64>;

    const MAGIC: u32;

    // Required methods
    fn cputype(&self) -> u32;
    fn cpusubtype(&self) -> u32;
    fn offset(&self) -> Self::Word;
    fn size(&self) -> Self::Word;
    fn align(&self) -> u32;

    // Provided methods
    fn architecture(&self) -> Architecture { ... }
    fn file_range(&self) -> (u64, u64) { ... }
    fn data<'data, R: ReadRef<'data>>(&self, file: R) -> Result<&'data [u8]> { ... }
}
Expand description

A trait for generic access to macho::FatArch32 and macho::FatArch64.

Required Associated Types§

Required Associated Constants§

Required Methods§

source

fn cputype(&self) -> u32

source

fn cpusubtype(&self) -> u32

source

fn offset(&self) -> Self::Word

source

fn size(&self) -> Self::Word

source

fn align(&self) -> u32

Provided Methods§

source

fn architecture(&self) -> Architecture

source

fn file_range(&self) -> (u64, u64)

source

fn data<'data, R: ReadRef<'data>>(&self, file: R) -> Result<&'data [u8]>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl FatArch for FatArch32

source§

type Word = u32

source§

const MAGIC: u32 = 3_405_691_582u32

source§

impl FatArch for FatArch64

source§

type Word = u64

source§

const MAGIC: u32 = 3_405_691_583u32