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<T: Zeroize + NewBytes + Clone> Clone for UnlockedRO<T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<A: Zeroize + Bytes + AsRef<[u8]>, LM: LockMode> AsRef<[u8]> for Protected<A, ReadOnly, LM>

source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<const LENGTH: usize> ByteArray<LENGTH> for Protected<HeapByteArray<LENGTH>, ReadOnly, Unlocked>

source§

fn as_array(&self) -> &[u8; LENGTH]

Returns a reference to the underlying fixed-length byte array.
source§

impl<A: Zeroize + Bytes, LM: LockMode> Bytes for Protected<A, ReadOnly, LM>

source§

fn as_slice(&self) -> &[u8]

Returns a slice of the underlying bytes.
source§

fn len(&self) -> usize

Shorthand to retrieve the underlying length of the byte array.
source§

fn is_empty(&self) -> bool

Returns true if the array is empty.
source§

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

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

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>

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().
source§

impl<A: Zeroize + Bytes, PM: ProtectMode> ProtectNoAccess<A, PM> for Protected<A, PM, Unlocked>

source§

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.
source§

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

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.
source§

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

source§

fn mprotect_readwrite(self) -> Result<Protected<A, ReadWrite, LM>, Error>

Protects a region of memory as read-write (and no exec), using mprotect() on UNIX, or VirtualProtect() on Windows.
source§

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

source§

fn munlock(self) -> Result<Protected<A, PM, Unlocked>, Error>

Unlocks a region of memory, using munlock() on UNIX, or VirtualLock() on Windows.
source§

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

source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.
source§

impl<A: Bytes + Zeroize, LM: LockMode> Deref for Protected<A, ReadOnly, LM>

§

type Target = [u8]

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.