Type Alias dryoc::protected::ptypes::UnlockedRO
source · pub type UnlockedRO<T> = Protected<T, ReadOnly, Unlocked>;
Available on crate feature
nightly
only.Expand description
Unlocked, read-only, page-aligned memory region type alias
Aliased Type§
struct UnlockedRO<T> { /* private fields */ }
Trait Implementations§
source§impl<A: Zeroize + Bytes + AsRef<[u8]>, LM: LockMode> AsRef<[u8]> for Protected<A, ReadOnly, LM>
impl<A: Zeroize + Bytes + AsRef<[u8]>, LM: LockMode> AsRef<[u8]> for Protected<A, ReadOnly, LM>
source§impl<const LENGTH: usize> ByteArray<LENGTH> for Protected<HeapByteArray<LENGTH>, ReadOnly, Unlocked>
impl<const LENGTH: usize> ByteArray<LENGTH> for Protected<HeapByteArray<LENGTH>, ReadOnly, Unlocked>
source§impl<A: Zeroize + Bytes + Default, PM: ProtectMode> Lock<A, PM> for Protected<A, PM, Unlocked>
impl<A: Zeroize + Bytes + Default, PM: ProtectMode> Lock<A, PM> for Protected<A, PM, Unlocked>
source§fn mlock(self) -> Result<Protected<A, PM, Locked>, Error>
fn mlock(self) -> Result<Protected<A, PM, Locked>, Error>
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()
.