ElfFlags

Struct ElfFlags 

Source
pub struct ElfFlags(/* private fields */);

Implementations§

Source§

impl ElfFlags

Source

pub const XGATE_ABI: Self

Source

pub const M68HC11_ABI: Self

Source

pub const M68K_CF_ISA_MASK: Self

Which ISA

Source

pub const IA_64_MASKOS: Self

OS-specific flags.

Source

pub const PICOJAVA_ARCH: Self

Source

pub const BPF_CPUVER: Self

Source

pub const XTENSA_MACH: Self

Source

pub const M32R_IGNORE: Self

Source

pub const NDS32_ELF_VERSION: Self

Source

pub const XGATE_MACH_MASK: Self

Source

pub const M68HC11_MACH_MASK: Self

Source

pub const NDS_ABI: Self

Source

pub const XGATE_MACH: Self

XGATE microcontroller.

Source

pub const ARM_NEW_ABI: Self

Source

pub const AVR_LINKRELAX_PREPARED: Self

Source

pub const FRV_MEDIA: Self

-mmedia

Source

pub const MIPS_OPTIONS_FIRST: Self

Source

pub const IA_64_NOFUNCDESC_CONS_GP: Self

And no function descriptors.

Source

pub const FRV_GPR_MASK: Self

mask for # of gprs

Source

pub const IQ2000_CPU_MASK: Self

specific cpu bits

Source

pub const MT_CPU_MS2: Self

MS2

Source

pub const MT_CPU_MASK: Self

specific cpu bits

Source

pub const M68K_CF_ISA_A_PLUS: Self

Source

pub const IA_64_VMS_COMCOD: Self

Completion code.

Source

pub const Z80_MACH_R800: Self

Source

pub const IA_64_VMS_COMCOD_ABORT: Self

Source

pub const PPC64_ABI: Self

Source

pub const SH3: Self

Source

pub const IQ2000_ALL_FLAGS: Self

Source

pub const BFIN_PIC_FLAGS: Self

Source

pub const SPARCV9_MM: Self

memory model mask

Source

pub const LOONGARCH_ABI_DOUBLE_FLOAT: Self

Source

pub const MT_ALL_FLAGS: Self

Source

pub const FRV_GPR_32: Self

-mgpr-32

Source

pub const RH850_FPU_DOUBLE: Self

sizeof(double) == 8.

Source

pub const S390_HIGH_GPRS: Self

Source

pub const MIPS_NOREORDER: Self

Source

pub const IQ2000_CPU_IQ2000: Self

default

Source

pub const BFIN_PIC: Self

-fpic

Source

pub const NIOS2_ARCH_R2: Self

Source

pub const LM32_MACH: Self

Source

pub const MT_CPU_MRISC: Self

default

Source

pub const ALPHA_32BIT: Self

Source

pub const CRIS_UNDERSCORE: Self

Source

pub const VAX_NONPIC: Self

Object contains non-PIC code

Source

pub const RH850_DATA_ALIGN4: Self

Aligned to 4-byte bounadries.

Source

pub const RH850_DOUBLE32: Self

32-bits in size.

Source

pub const RH850_FPU20: Self

Set if [N]]M{ADD|SUB}F.S are used.

Source

pub const RH850_SIMD: Self

Source

pub const RH850_CACHE: Self

Source

pub const RH850_MMU: Self

Source

pub const RISCV_RVC: Self

Source

pub const VISIUM_ARCH_MCM: Self

Source

pub const M68K_CF_ISA_A_NODIV: Self

ISA A except for div

Source

pub const Z80_MACH_Z80: Self

Source

pub const ARM_RELEXEC: Self

Source

pub const IA_64_TRAPNIL: Self

Trap NIL pointer dereferences.

Source

pub const IA_64_VMS_COMCOD_WARNING: Self

Source

pub const SH1: Self

Source

pub const OR1K_NODELAY: Self

Source

pub const SPARCV9_PSO: Self

partial store ordering

Source

pub const LOONGARCH_ABI_SOFT_FLOAT: Self

Source

pub const C6000_REL: Self

Source

pub const FRV_GPR_64: Self

-mgpr-64

Source

pub const RH850_FPU_SINGLE: Self

sizeof(double) == 4.

Source

pub const MIPS_PIC: Self

Source

pub const IQ2000_CPU_IQ10: Self

IQ10

Source

pub const BFIN_FDPIC: Self

-mfdpic

Source

pub const MT_CPU_MRISC2: Self

MRISC2

Source

pub const ALPHA_CANRELAX: Self

Source

pub const CRIS_VARIANT_V32: Self

Source

pub const RH850_DATA_ALIGN8: Self

Aligned to 8-byte bounadries.

Source

pub const RH850_DOUBLE64: Self

64-bits in size.

Source

pub const RH850_FPU30: Self

Set if ADSF.D or ADDF.D is used.

Source

pub const RISCV_FLOAT_ABI_SINGLE: Self

Source

pub const VISIUM_ARCH_MCM24: Self

Source

pub const M68K_CF_ISA_A: Self

Source

pub const Z80_MACH_Z180: Self

Source

pub const ARM_HASENTRY: Self

Source

pub const IA_64_VMS_COMCOD_ERROR: Self

Source

pub const SH2: Self

Source

pub const SPARCV9_RMO: Self

relaxed store ordering

Source

pub const LOONGARCH_ABI_SINGLE_FLOAT: Self

Source

pub const FRV_FPR_MASK: Self

mask for # of fprs

Source

pub const FRV_FPR_NONE: Self

-msoft-float

Source

pub const SH4A: Self

Source

pub const FRV_FPR_32: Self

-mfpr-32

Source

pub const MIPS_CPIC: Self

Source

pub const CRIS_VARIANT_COMMON_V10_V32: Self

Source

pub const RISCV_FLOAT_ABI_DOUBLE: Self

Source

pub const VISIUM_ARCH_GR6: Self

Source

pub const M68K_CF_ISA_B_NOUSP: Self

ISA_B except for USP

Source

pub const IA_64_VMS_LINKAGES: Self

Contains VMS linkages info.

Source

pub const Z80_MACH_EZ80_Z80: Self

Source

pub const ARM_INTERWORK: Self

Source

pub const ARM_SYMSARESORTED: Self

NB conflicts with EF_INTERWORK.

Source

pub const IA_64_EXT: Self

Program uses arch. extensions.

Source

pub const NDS_ABI_SHIFT: Self

Source

pub const SH_DSP: Self

Source

pub const FRV_FPR_64: Self

-mfpr-64

Source

pub const MIPS_XGOT: Self

Source

pub const RISCV_RVE: Self

Source

pub const IA_64_BE: Self

PSR BE bit set (big-endian).

Source

pub const ARM_APCS_26: Self

Source

pub const ARM_DYNSYMSUSESEGIDX: Self

NB conflicts with EF_APCS26.

Source

pub const SH3E: Self

Source

pub const FRV_DWORD_MASK: Self

mask for dword support

Source

pub const M68K_CF_MAC_MASK: Self

Source

pub const M68K_CF_EMAC_B: Self

EMAC_B

Source

pub const AMDGPU_MACH_AMDGCN_GFX908: Self

Source

pub const FRV_DWORD_YES: Self

use double word insns

Source

pub const MIPS_UCODE: Self

Source

pub const PICOJAVA_NEWCALLS: Self

Source

pub const BFIN_CODE_IN_L1: Self

–code-in-l1

Source

pub const RISCV_TSO: Self

Source

pub const M68K_CF_MAC: Self

MAC

Source

pub const M68HC12_MACH: Self

68HC12 microcontroller.

Source

pub const ARM_APCS_FLOAT: Self

Source

pub const ARM_MAPSYMSFIRST: Self

NB conflicts with EF_APCS_FLOAT.

Source

pub const IA_64_ABI64: Self

64-bit ABI.

Source

pub const SH4_NOFPU: Self

Source

pub const MIPS_64BIT_WHIRL: Self

Source

pub const FRV_DWORD_NO: Self

don’t use double word insn

Source

pub const RH850_REGMODE22: Self

Registers r15-r24 (inclusive) are not used.

Source

pub const MIPS_ABI2: Self

Source

pub const PICOJAVA_GNUCALLS: Self

The (currently) non standard GNU calling convention

Source

pub const BFIN_DATA_IN_L1: Self

–data-in-l1

Source

pub const M68K_CF_EMAC: Self

EMAC

Source

pub const M68HCS12_MACH: Self

68HCS12 microcontroller.

Source

pub const ARM_PIC: Self

Source

pub const IA_64_REDUCEDFP: Self

Only FP6-FP11 used.

Source

pub const AMDGPU_MACH_AMDGCN_MIN: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX600: Self

Source

pub const FRV_DOUBLE: Self

-mdouble

Source

pub const RH850_REGMODE32: Self

Source

pub const M68K_CF_FLOAT: Self

Has float insns

Source

pub const LOONGARCH_OBJABI_V1: Self

Source

pub const ARM_ALIGN8: Self

8-bit structure alignment is in use.

Source

pub const IA_64_CONS_GP: Self

gp as program wide constant.

Source

pub const AMDGPU_MACH_AMDGCN_GFX940: Self

Source

pub const MIPS_ABI_ON32: Self

Source

pub const FRV_PIC: Self

-fpic

Source

pub const RH850_GP_FIX: Self

r4 is fixed.

Source

pub const MIPS_32BITMODE: Self

Source

pub const MEP_LIBRARY: Self

Built as a library

Source

pub const ARC_PIC: Self

Source

pub const XTENSA_XT_INSN: Self

Source

pub const VAX_DFLOAT: Self

Object contains D-Float insn.

Source

pub const IA_64_ABSOLUTE: Self

Load at absolute addresses.

Source

pub const SPARC_32PLUS: Self

generic V8+ features

Source

pub const ARM_OLD_ABI: Self

Source

pub const SH_PIC: Self

Source

pub const AMDGPU_FEATURE_XNACK_V3: Self

Source

pub const AMDGPU_FEATURE_XNACK_ANY_V4: Self

Source

pub const FRV_NON_PIC_RELOCS: Self

used non pic safe relocs

Source

pub const RH850_GP_NOFIX: Self

r4 is callee save.

Source

pub const MIPS_FP64: Self

Source

pub const XTENSA_XT_LIT: Self

Source

pub const VAX_GFLOAT: Self

Object contains G-Float insn.

Source

pub const SPARC_SUN_US1: Self

Sun UltraSPARC1 extensions

Source

pub const ARM_SOFT_FLOAT: Self

Source

pub const ARM_ABI_FLOAT_SOFT: Self

NB conflicts with EF_ARM_SOFT_FLOAT.

Source

pub const AMDGPU_FEATURE_SRAMECC_V3: Self

Source

pub const AMDGPU_FEATURE_XNACK_OFF_V4: Self

Source

pub const FRV_MULADD: Self

-mmuladd

Source

pub const RH850_EP_FIX: Self

r30 is fixed.

Source

pub const MIPS_NAN2008: Self

Source

pub const SPARC_HAL_R1: Self

HAL R1 extensions

Source

pub const ARM_VFP_FLOAT: Self

Source

pub const ARM_ABI_FLOAT_HARD: Self

NB conflicts with EF_ARM_VFP_FLOAT.

Source

pub const AMDGPU_FEATURE_SRAMECC_ANY_V4: Self

Source

pub const FRV_BIGPIC: Self

-fPIC

Source

pub const RH850_EP_NOFIX: Self

r30 is callee save.

Source

pub const SPARC_SUN_US3: Self

Sun UltraSPARCIII extensions

Source

pub const ARM_MAVERICK_FLOAT: Self

Source

pub const AMDGPU_FEATURE_SRAMECC_OFF_V4: Self

Source

pub const FRV_LIBPIC: Self

-mlibrary-pic

Source

pub const RH850_TP_FIX: Self

r5 is fixed.

Source

pub const FRV_G0: Self

-G 0, no small data ptr

Source

pub const RH850_TP_NOFIX: Self

r5 is callee save.

Source

pub const FRV_NOPACK: Self

-mnopack

Source

pub const RH850_REG2_RESERVE: Self

r2 is fixed.

Source

pub const FRV_FDPIC: Self

-mfdpic

Source

pub const RH850_REG2_NORESERVE: Self

r2 is callee saved.

Source

pub const M68K_CFV4E: Self

Source

pub const I370_RELOCATABLE_LIB: Self

i370 -mrelocatable-lib flag

Source

pub const PPC_RELOCATABLE_LIB: Self

PowerPC -mrelocatable-lib flag.

Source

pub const SH_FDPIC: Self

Uses the FDPIC ABI.

Source

pub const FRV_CPU_MASK: Self

specific cpu bits

Source

pub const IA_64_ARCH: Self

Arch. version mask.

Source

pub const MEP_CPU_MASK: Self

specific cpu bits

Source

pub const ARM_EABIMASK: Self

Source

pub const FRV_CPU_GENERIC: Self

generic FRV

Source

pub const MEP_CPU_MEP: Self

generic MEP

Source

pub const MEP_COP_NONE: Self

Source

pub const ARM_EABI_UNKNOWN: Self

Source

pub const NIOS2_ARCH_R1: Self

Source

pub const CRIS_VARIANT_ANY_V0_V10: Self

Source

pub const MIPS_ARCH_1: Self

-mips1 code.

Source

pub const RISCV_FLOAT_ABI_SOFT: Self

Source

pub const IA_64_VMS_COMCOD_SUCCESS: Self

Source

pub const NDS32_ELF_VERSION_SHIFT: Self

Source

pub const SH_UNKNOWN: Self

For backwards compatibility.

Source

pub const M68HC11_GENERIC: Self

Generic 68HC12/backward compatibility.

Source

pub const SPARCV9_TSO: Self

total store ordering

Source

pub const AMDGPU_FEATURE_XNACK_UNSUPPORTED_V4: Self

Source

pub const AMDGPU_FEATURE_SRAMECC_UNSUPPORTED_V4: Self

Source

pub const FRV_CPU_FR500: Self

FRV500

Source

pub const M68K_M68000: Self

Source

pub const MEP_CPU_C2: Self

MEP c2

Source

pub const ARM_EABI_VER1: Self

Source

pub const IA_64_ARCHVER_1: Self

Arch. version level 1 compat.

Source

pub const FRV_CPU_FR300: Self

FRV300

Source

pub const M68K_FIDO: Self

Source

pub const MIPS_ARCH_ASE_MICROMIPS: Self

Source

pub const MEP_CPU_C3: Self

MEP c3

Source

pub const ARM_EABI_VER2: Self

Source

pub const FRV_CPU_SIMPLE: Self

SIMPLE

Source

pub const ARM_EABI_VER3: Self

Source

pub const FRV_CPU_TOMCAT: Self

Tomcat, FR500 prototype

Source

pub const MIPS_ARCH_ASE_M16: Self

Source

pub const MEP_CPU_C4: Self

MEP c4

Source

pub const ARM_EABI_VER4: Self

Source

pub const FRV_CPU_FR400: Self

FRV400

Source

pub const ARM_EABI_VER5: Self

Source

pub const FRV_CPU_FR550: Self

FRV550

Source

pub const FRV_CPU_FR405: Self

Source

pub const FRV_CPU_FR450: Self

Source

pub const MIPS_ARCH_ASE_MDMX: Self

Source

pub const MEP_CPU_C5: Self

MEP c5

Source

pub const FRV_PIC_FLAGS: Self

Source

pub const FRV_ALL_FLAGS: Self

Source

pub const MN10300_MACH: Self

Source

pub const MIPS_MACH: Self

Source

pub const H8_MACH: Self

Source

pub const MEP_COP_MASK: Self

Source

pub const V850_ARCH: Self

Source

pub const MIPS_ARCH: Self

Source

pub const RH850_ABI: Self

Source

pub const NDS_ARCH: Self

Source

pub const CSKY_ABIMASK: Self

Source

pub const V800_850E3: Self

Source

pub const PARISC_NO_KABP: Self

Source

pub const RISCV_FLOAT_ABI: Self

Source

pub const RISCV_FLOAT_ABI_QUAD: Self

Source

pub const M68K_CF_ISA_C: Self

Source

pub const Z80_MACH_Z80N: Self

Source

pub const SH4AL_DSP: Self

Source

pub const ARC_CPU_ARCV2HS: Self

Source

pub const M68K_CPU32: Self

Source

pub const CPU32: Self

Source

pub const M68K_ARCH_MASK: Self

Source

pub const M68K_CF_ISA_B: Self

Source

pub const Z80_MACH_GBZ80: Self

Source

pub const SH3_DSP: Self

Source

pub const ARC_CPU_ARCV2EM: Self

Source

pub const M68K_CF_ISA_C_NODIV: Self

ISA C except for div

Source

pub const LOONGARCH_ABI_MODIFIER_MASK: Self

Source

pub const M68K_CF_MASK: Self

Source

pub const MEP_INDEX_MASK: Self

Configuration index

Source

pub const ARC_MACH_MSK: Self

Source

pub const MSP430_MACH: Self

Source

pub const Z80_MACH_MSK: Self

Source

pub const AMDGPU_MACH: Self

Source

pub const I370_RELOCATABLE: Self

i370 -mrelocatable flag

Source

pub const PARISC_TRAPNIL: Self

Source

pub const PPC_RELOCATABLE: Self

PowerPC -mrelocatable flag.

Source

pub const MEP_COP_AVC: Self

Source

pub const SCORE_MACH: Self

Source

pub const OMIT_PIC_FIXDD: Self

Source

pub const M32R_INST: Self

Source

pub const CSKY_OTHER: Self

Source

pub const SCORE_PIC: Self

Source

pub const PPC_EMB: Self

PowerPC embedded flag.

Source

pub const MIPS_ARCH_64R2: Self

MIPS64r2 code.

Source

pub const SCORE_FIXDEP: Self

Source

pub const MIPS_ARCH_5: Self

-mips5 code.

Source

pub const PARISC_EXT: Self

Source

pub const MEP_COP_AVC2: Self

Source

pub const PARISC_LSB: Self

Source

pub const PARISC_WIDE: Self

Source

pub const PARISC_LAZYSWAP: Self

Source

pub const ARM_LE8: Self

Source

pub const PARISC_ARCH: Self

Source

pub const CSKY_PROCESSOR: Self

Source

pub const M32R_ARCH: Self

Source

pub const MIPS_ARCH_4: Self

-mips4 code.

Source

pub const MIPS_ARCH_ASE: Self

Source

pub const MIPS_ABI: Self

Source

pub const MEP_CPU_H1: Self

MEP h1

Source

pub const MIPS_ARCH_2: Self

-mips2 code.

Source

pub const CSKY_ABIV1: Self

Source

pub const MEP_COP_FMAX: Self

Source

pub const MEP_COP_IVC2: Self

Source

pub const MEP_ALL_FLAGS: Self

Source

pub const RL78_CPU_RL78: Self

FIXME: correct value?

Source

pub const RX_CPU_RX: Self

FIXME: this collides with the E_FLAG_RX_… values below.

Source

pub const RL78_CPU_MASK: Self

specific cpu bits.

Source

pub const M32C_CPU_MASK: Self

specific cpu bits

Source

pub const RL78_ALL_FLAGS: Self

Source

pub const AVR_MACH: Self

Source

pub const M32C_ALL_FLAGS: Self

Source

pub const Z80_MACH_EZ80_ADL: Self

Source

pub const SPARC_32PLUS_MASK: Self

bits indicating V8+ type

Source

pub const SPARC_EXT_MASK: Self

reserved for vendor extensions

Source

pub const SPARC_LEDATA: Self

little endian data

Source

pub const ARM_BE8: Self

Source

pub const LOONGARCH_OBJABI_MASK: Self

Source

pub const LOONGARCH_ABI_MASK: Self

Source

pub const M32C_CPU_M16C: Self

default

Source

pub const M32C_CPU_M32C: Self

m32c

Source

pub const NDS_ARCH_SHIFT: Self

Source

pub const NDS_INST: Self

Source

pub const SH_MACH_MASK: Self

Source

pub const SH4: Self

Source

pub const SH2E: Self

Source

pub const SH2A: Self

Source

pub const SH4A_NOFPU: Self

Source

pub const SH4_NOMMU_NOFPU: Self

Source

pub const SH2A_NOFPU: Self

Source

pub const SH3_NOMMU: Self

Source

pub const SH2A_SH4_NOFPU: Self

Source

pub const SH2A_SH3_NOFPU: Self

Source

pub const SH2A_SH4: Self

Source

pub const SH2A_SH3E: Self

Source

pub const SH5: Self

Source

pub const ARC_OSABI_MSK: Self

Source

pub const ARC_ALL_MSK: Self

Source

pub const RX_CPU_MASK: Self

specific cpu bits.

Source

pub const RX_ALL_FLAGS: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX601: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX700: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX701: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX702: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX703: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX704: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX801: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX802: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX803: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX810: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX900: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX902: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX904: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX906: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX909: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX90C: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX1010: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX1011: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX1012: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX1030: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX1031: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX1032: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX1033: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX602: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX705: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX805: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX1035: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX1034: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX90A: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX1013: Self

Source

pub const AMDGPU_MACH_AMDGCN_GFX1036: Self

Source

pub const AMDGPU_FEATURE_XNACK_V4: Self

Source

pub const AMDGPU_FEATURE_XNACK_ON_V4: Self

Source

pub const AMDGPU_FEATURE_SRAMECC_V4: Self

Source

pub const AMDGPU_FEATURE_SRAMECC_ON_V4: Self

Source

pub const CRIS_VARIANT_MASK: Self

Source

pub const MIPS_ARCH_3: Self

-mips3 code.

Source

pub const CSKY_ABIV2: Self

Source

pub const MIPS_ARCH_32: Self

MIPS32 code.

Source

pub const MIPS_ARCH_64: Self

MIPS64 code.

Source

pub const MIPS_ARCH_32R2: Self

MIPS32r2 code.

Source§

impl ElfFlags

Source

pub const fn empty() -> Self

Get a flags value with all bits unset.

Source

pub const fn all() -> Self

Get a flags value with all known bits set.

Source

pub const fn bits(&self) -> u32

Get the underlying bits value.

The returned value is exactly the bits set in this flags value.

Source

pub const fn from_bits(bits: u32) -> Option<Self>

Convert from a bits value.

This method will return None if any unknown bits are set.

Source

pub const fn from_bits_truncate(bits: u32) -> Self

Convert from a bits value, unsetting any unknown bits.

Source

pub const fn from_bits_retain(bits: u32) -> Self

Convert from a bits value exactly.

Source

pub fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set.

This method will return None if name is empty or doesn’t correspond to any named flag.

Source

pub const fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.

Source

pub const fn is_all(&self) -> bool

Whether all known bits in this flags value are set.

Source

pub const fn intersects(&self, other: Self) -> bool

Whether any set bits in a source flags value are also set in a target flags value.

Source

pub const fn contains(&self, other: Self) -> bool

Whether all set bits in a source flags value are also set in a target flags value.

Source

pub fn insert(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

Source

pub fn remove(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

This method is not equivalent to self & !other when other has unknown bits set. remove won’t truncate other, but the ! operator will.

Source

pub fn toggle(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

Source

pub fn set(&mut self, other: Self, value: bool)

Call insert when value is true or remove when value is false.

Source

pub const fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

Source

pub const fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.

Source

pub const fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

This method is not equivalent to self & !other when other has unknown bits set. difference won’t truncate other, but the ! operator will.

Source

pub const fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

Source

pub const fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

Source§

impl ElfFlags

Source

pub const fn iter(&self) -> Iter<ElfFlags>

Yield a set of contained flags values.

Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.

Source

pub const fn iter_names(&self) -> IterNames<ElfFlags>

Yield a set of contained named flags values.

This method is like iter, except only yields bits in contained named flags. Any unknown bits, or bits not corresponding to a contained flag will not be yielded.

Trait Implementations§

Source§

impl Binary for ElfFlags

Source§

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

Formats the value using the given formatter. Read more
Source§

impl BinarySerde for ElfFlags

Source§

const SERIALIZED_SIZE: usize = 4usize

the size of this type when serialized to a packed binary format.
Source§

type RecursiveArray = <<ElfFlags as Flags>::Bits as BinarySerde>::RecursiveArray

the fixed size recursive array type that is returned when serializing this type to an array. the length of this array is guaranteed to be equal to Self::SERIALIZED_SIZE.
Source§

fn binary_serialize(&self, buf: &mut [u8], endianness: Endianness)

serialize this value into the given buffer using the given endianness. Read more
Source§

fn binary_deserialize( buf: &[u8], endianness: Endianness, ) -> Result<Self, DeserializeError>

deserializes the given buffer using the given endianness into a value of this type. Read more
Source§

fn binary_serialize_to_array( &self, endianness: Endianness, ) -> Self::RecursiveArray

serialize this value to a fixed size array using the given endianness.
Source§

impl BitAnd for ElfFlags

Source§

fn bitand(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.

Source§

type Output = ElfFlags

The resulting type after applying the & operator.
Source§

impl BitAndAssign for ElfFlags

Source§

fn bitand_assign(&mut self, other: Self)

The bitwise and (&) of the bits in two flags values.

Source§

impl BitOr for ElfFlags

Source§

fn bitor(self, other: ElfFlags) -> Self

The bitwise or (|) of the bits in two flags values.

Source§

type Output = ElfFlags

The resulting type after applying the | operator.
Source§

impl BitOrAssign for ElfFlags

Source§

fn bitor_assign(&mut self, other: Self)

The bitwise or (|) of the bits in two flags values.

Source§

impl BitXor for ElfFlags

Source§

fn bitxor(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.

Source§

type Output = ElfFlags

The resulting type after applying the ^ operator.
Source§

impl BitXorAssign for ElfFlags

Source§

fn bitxor_assign(&mut self, other: Self)

The bitwise exclusive-or (^) of the bits in two flags values.

Source§

impl Clone for ElfFlags

Source§

fn clone(&self) -> ElfFlags

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ElfFlags

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Extend<ElfFlags> for ElfFlags

Source§

fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)

The bitwise or (|) of the bits in each flags value.

Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl Flags for ElfFlags

Source§

const FLAGS: &'static [Flag<ElfFlags>]

The set of defined flags.
Source§

type Bits = u32

The underlying bits type.
Source§

fn bits(&self) -> u32

Get the underlying bits value. Read more
Source§

fn from_bits_retain(bits: u32) -> ElfFlags

Convert from a bits value exactly.
Source§

fn empty() -> Self

Get a flags value with all bits unset.
Source§

fn all() -> Self

Get a flags value with all known bits set.
Source§

fn contains_unknown_bits(&self) -> bool

This method will return true if any unknown bits are set.
Source§

fn from_bits(bits: Self::Bits) -> Option<Self>

Convert from a bits value. Read more
Source§

fn from_bits_truncate(bits: Self::Bits) -> Self

Convert from a bits value, unsetting any unknown bits.
Source§

fn from_name(name: &str) -> Option<Self>

Get a flags value with the bits of a flag with the given name set. Read more
Source§

fn iter(&self) -> Iter<Self>

Yield a set of contained flags values. Read more
Source§

fn iter_names(&self) -> IterNames<Self>

Yield a set of contained named flags values. Read more
Source§

fn iter_defined_names() -> IterDefinedNames<Self>

Yield a set of all named flags defined by Self::FLAGS.
Source§

fn is_empty(&self) -> bool

Whether all bits in this flags value are unset.
Source§

fn is_all(&self) -> bool

Whether all known bits in this flags value are set.
Source§

fn intersects(&self, other: Self) -> bool
where Self: Sized,

Whether any set bits in a source flags value are also set in a target flags value.
Source§

fn contains(&self, other: Self) -> bool
where Self: Sized,

Whether all set bits in a source flags value are also set in a target flags value.
Source§

fn truncate(&mut self)
where Self: Sized,

Remove any unknown bits from the flags.
Source§

fn insert(&mut self, other: Self)
where Self: Sized,

The bitwise or (|) of the bits in two flags values.
Source§

fn remove(&mut self, other: Self)
where Self: Sized,

The intersection of a source flags value with the complement of a target flags value (&!). Read more
Source§

fn toggle(&mut self, other: Self)
where Self: Sized,

The bitwise exclusive-or (^) of the bits in two flags values.
Source§

fn set(&mut self, other: Self, value: bool)
where Self: Sized,

Call Flags::insert when value is true or Flags::remove when value is false.
Source§

fn clear(&mut self)
where Self: Sized,

Unsets all bits in the flags.
Source§

fn intersection(self, other: Self) -> Self

The bitwise and (&) of the bits in two flags values.
Source§

fn union(self, other: Self) -> Self

The bitwise or (|) of the bits in two flags values.
Source§

fn difference(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!). Read more
Source§

fn symmetric_difference(self, other: Self) -> Self

The bitwise exclusive-or (^) of the bits in two flags values.
Source§

fn complement(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§

impl FromIterator<ElfFlags> for ElfFlags

Source§

fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self

The bitwise or (|) of the bits in each flags value.

Source§

impl Hash for ElfFlags

Source§

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

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl IntoIterator for ElfFlags

Source§

type Item = ElfFlags

The type of the elements being iterated over.
Source§

type IntoIter = Iter<ElfFlags>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl LowerHex for ElfFlags

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Not for ElfFlags

Source§

fn not(self) -> Self

The bitwise negation (!) of the bits in a flags value, truncating the result.

Source§

type Output = ElfFlags

The resulting type after applying the ! operator.
Source§

impl Octal for ElfFlags

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ElfFlags

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PublicFlags for ElfFlags

Source§

type Primitive = u32

The type of the underlying storage.
Source§

type Internal = InternalBitFlags

The type of the internal field on the generated flags type.
Source§

impl Sub for ElfFlags

Source§

fn sub(self, other: Self) -> Self

The intersection of a source flags value with the complement of a target flags value (&!).

This method is not equivalent to self & !other when other has unknown bits set. difference won’t truncate other, but the ! operator will.

Source§

type Output = ElfFlags

The resulting type after applying the - operator.
Source§

impl SubAssign for ElfFlags

Source§

fn sub_assign(&mut self, other: Self)

The intersection of a source flags value with the complement of a target flags value (&!).

This method is not equivalent to self & !other when other has unknown bits set. difference won’t truncate other, but the ! operator will.

Source§

impl UpperHex for ElfFlags

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Copy for ElfFlags

Source§

impl Eq for ElfFlags

Source§

impl StructuralPartialEq for ElfFlags

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.