#[repr(u32)]pub enum HardenedRuntimeFlags {
None = 0,
Enabled = 1,
MapJit = 2,
EnabledMapJit = 3,
}
Expand description
Hardened runtime flags.
Variants§
None = 0
No flags
Enabled = 1
Hardened runtime is enabled - it’s not possible to have “Write & Execute” memory protection. The runtime enforces W^X (either write or execute).
§Note
If the runtime is hardened it means that an operating system specific protection is used. For example
on Apple OSX it’s possible to allocate memory with MAP_JIT flag and then use pthread_jit_write_protect_np()
to temporarily swap access permissions for the current thread. Dual mapping is also a possibility on X86/X64
architecture.
MapJit = 2
Read+Write+Execute can only be allocated with MAP_JIT flag (Apple specific, only available on OSX).
EnabledMapJit = 3
Trait Implementations§
Source§impl Clone for HardenedRuntimeFlags
impl Clone for HardenedRuntimeFlags
Source§fn clone(&self) -> HardenedRuntimeFlags
fn clone(&self) -> HardenedRuntimeFlags
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for HardenedRuntimeFlags
impl Debug for HardenedRuntimeFlags
Source§impl Default for HardenedRuntimeFlags
impl Default for HardenedRuntimeFlags
Source§fn default() -> HardenedRuntimeFlags
fn default() -> HardenedRuntimeFlags
Returns the “default value” for a type. Read more
Source§impl Hash for HardenedRuntimeFlags
impl Hash for HardenedRuntimeFlags
Source§impl Ord for HardenedRuntimeFlags
impl Ord for HardenedRuntimeFlags
Source§fn cmp(&self, other: &HardenedRuntimeFlags) -> Ordering
fn cmp(&self, other: &HardenedRuntimeFlags) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for HardenedRuntimeFlags
impl PartialEq for HardenedRuntimeFlags
Source§impl PartialOrd for HardenedRuntimeFlags
impl PartialOrd for HardenedRuntimeFlags
impl Copy for HardenedRuntimeFlags
impl Eq for HardenedRuntimeFlags
impl StructuralPartialEq for HardenedRuntimeFlags
Auto Trait Implementations§
impl Freeze for HardenedRuntimeFlags
impl RefUnwindSafe for HardenedRuntimeFlags
impl Send for HardenedRuntimeFlags
impl Sync for HardenedRuntimeFlags
impl Unpin for HardenedRuntimeFlags
impl UnwindSafe for HardenedRuntimeFlags
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