pub trait ProtectNoAccess<A: Zeroize + Bytes, PM: ProtectMode> {
// Required method
fn mprotect_noaccess(
self,
) -> Result<Protected<A, NoAccess, Unlocked>, Error>;
}Available on crate feature
protected only.Expand description
Protected region of memory that can be set as no-access. Must be unlocked.
Required Methods§
Sourcefn mprotect_noaccess(self) -> Result<Protected<A, NoAccess, Unlocked>, Error>
fn mprotect_noaccess(self) -> Result<Protected<A, NoAccess, Unlocked>, Error>
Protects an unlocked region of memory as no-access (and no exec), using
mprotect() on UNIX, or VirtualProtect() on Windows.
§Errors
Returns error::Error::Io if the page permissions cannot be changed.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".