#[repr(u32)]pub enum HardenedRuntimeFlags {
None,
Enabled,
MapJit,
EnabledMapJit,
}Expand description
Hardened runtime flags.
Variants§
None
No flags
Enabled
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
Read+Write+Execute can only be allocated with MAP_JIT flag (Apple specific, only available on OSX).
EnabledMapJit
Trait Implementations§
source§impl Clone for HardenedRuntimeFlags
impl Clone for HardenedRuntimeFlags
source§fn clone(&self) -> HardenedRuntimeFlags
fn clone(&self) -> HardenedRuntimeFlags
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
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<HardenedRuntimeFlags> for HardenedRuntimeFlags
impl PartialEq<HardenedRuntimeFlags> for HardenedRuntimeFlags
source§fn eq(&self, other: &HardenedRuntimeFlags) -> bool
fn eq(&self, other: &HardenedRuntimeFlags) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<HardenedRuntimeFlags> for HardenedRuntimeFlags
impl PartialOrd<HardenedRuntimeFlags> for HardenedRuntimeFlags
source§fn partial_cmp(&self, other: &HardenedRuntimeFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &HardenedRuntimeFlags) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Copy for HardenedRuntimeFlags
impl Eq for HardenedRuntimeFlags
impl StructuralEq for HardenedRuntimeFlags
impl StructuralPartialEq for HardenedRuntimeFlags
Auto Trait Implementations§
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