#[repr(transparent)]pub struct PFlags(u32);Expand description
Bitfield wrapper for Elf64_Phdr.p_flags (32-bit)
Layout (LSB→MSB):
- bit 0: execute
 - bit 1: write
 - bit 2: read
 - bits 3..31: reserved (must be zero for standard flags)
 
Tuple Fields§
§0: u32Implementations§
Source§impl PFlags
 
impl PFlags
const EXECUTE_BITS: usize = 1usize
const EXECUTE_OFFSET: usize = 0usize
const WRITE_BITS: usize = 1usize
const WRITE_OFFSET: usize = 1usize
const READ_BITS: usize = 1usize
const READ_OFFSET: usize = 2usize
Sourcepub const fn with_execute_checked(self, value: bool) -> Result<Self, ()>
 
pub const fn with_execute_checked(self, value: bool) -> Result<Self, ()>
Bits: 0..1
Sourcepub const fn with_execute(self, value: bool) -> Self
 
pub const fn with_execute(self, value: bool) -> Self
Bits: 0..1
Sourcepub const fn set_execute(&mut self, value: bool)
 
pub const fn set_execute(&mut self, value: bool)
Bits: 0..1
Sourcepub const fn with_write_checked(self, value: bool) -> Result<Self, ()>
 
pub const fn with_write_checked(self, value: bool) -> Result<Self, ()>
Bits: 1..2
Sourcepub const fn with_write(self, value: bool) -> Self
 
pub const fn with_write(self, value: bool) -> Self
Bits: 1..2
Sourcepub const fn with_read_checked(self, value: bool) -> Result<Self, ()>
 
pub const fn with_read_checked(self, value: bool) -> Result<Self, ()>
Bits: 2..3
Trait Implementations§
impl Copy for PFlags
Auto Trait Implementations§
impl Freeze for PFlags
impl RefUnwindSafe for PFlags
impl Send for PFlags
impl Sync for PFlags
impl Unpin for PFlags
impl UnwindSafe for PFlags
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more