Trait dryoc::protected::ProtectReadOnly
source · pub trait ProtectReadOnly<A: Zeroize + Bytes, PM: ProtectMode, LM: LockMode> {
fn mprotect_readonly(self) -> Result<Protected<A, ReadOnly, LM>, Error>;
}Available on crate feature
nightly only.Expand description
Protected region of memory that can be set as read-only.
Required Methods
sourcefn mprotect_readonly(self) -> Result<Protected<A, ReadOnly, LM>, Error>
fn mprotect_readonly(self) -> Result<Protected<A, ReadOnly, LM>, Error>
Protects a region of memory as read-only (and no exec), using
mprotect() on UNIX, or VirtualProtect() on Windows.