pub trait ProtectReadOnly<A: Zeroize + Bytes, PM: ProtectMode, LM: LockMode> {
    // Required method
    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§

source

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.

Implementors§

source§

impl<A: Zeroize + Bytes, PM: ProtectMode, LM: LockMode> ProtectReadOnly<A, PM, LM> for Protected<A, PM, LM>