Enum FileKind

enum FileKind

A file format kind.

Variants

Archive

A Unix archive.

See archive::ArchiveFile.

Coff

A COFF object file.

See coff::CoffFile.

CoffBig

A COFF bigobj object file.

This supports a larger number of sections.

See coff::CoffBigFile.

CoffImport

A Windows short import file.

See coff::ImportFile.

DyldCache

A dyld cache file containing Mach-O images.

See macho::DyldCache

Elf32

A 32-bit ELF file.

See elf::ElfFile32.

Elf64

A 64-bit ELF file.

See elf::ElfFile64.

MachO32

A 32-bit Mach-O file.

See macho::MachOFile32.

MachO64

A 64-bit Mach-O file.

See macho::MachOFile64.

MachOFat32

A 32-bit Mach-O fat binary.

See macho::MachOFatFile32.

MachOFat64

A 64-bit Mach-O fat binary.

See macho::MachOFatFile64.

Pe32

A 32-bit PE file.

See pe::PeFile32.

Pe64

A 64-bit PE file.

See pe::PeFile64.

Xcoff32

A 32-bit XCOFF file.

See xcoff::XcoffFile32.

Xcoff64

A 64-bit XCOFF file.

See xcoff::XcoffFile64.

Implementations

impl FileKind

fn parse<'data, R: ReadRef<'data>>(data: R) -> Result<FileKind>

Determine a file kind by parsing the start of the file.

fn parse_at<'data, R: ReadRef<'data>>(data: R, offset: u64) -> Result<FileKind>

Determine a file kind by parsing at the given offset.

impl Clone for FileKind

fn clone(self: &Self) -> FileKind

impl Copy for FileKind

impl Debug for FileKind

fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result

impl Eq for FileKind

impl Freeze for FileKind

impl Hash for FileKind

fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)

impl PartialEq for FileKind

fn eq(self: &Self, other: &FileKind) -> bool

impl RefUnwindSafe for FileKind

impl Send for FileKind

impl StructuralPartialEq for FileKind

impl Sync for FileKind

impl Unpin for FileKind

impl UnwindSafe for FileKind

impl<T> Any for FileKind

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for FileKind

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for FileKind

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for FileKind

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for FileKind

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for FileKind

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for FileKind

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for FileKind

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for FileKind

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>