Trait dryoc::protected::Lock[][src]

pub trait Lock<A: Zeroize + Bytes, PM: ProtectMode> {
    fn mlock(self) -> Result<Protected<A, PM, Locked>, Error>;
}
This is supported on crate feature nightly only.
Expand description

Protected region of memory that can be locked.

Required methods

Locks a region of memory, using mlock() on UNIX, or VirtualLock() on Windows. By default, the protect mode is set to ReadWrite (i.e., no exec) using mprotect() on UNIX, or VirtualProtect() on Windows. On Linux, it will also set MADV_DONTDUMP using madvise().

Implementors