Skip to main content

Module traits

Module traits 

Source
Available on crate feature protected only.
Expand description

Type-level states of a Protected region.

Protected<A, PM, LM> tracks its page protection (PM, a ProtectMode) and whether its pages are locked (LM, a LockMode) in its type, so each state only exposes the operations valid for it. The aliases Locked, LockedRO, Unlocked, UnlockedRO and NoAccess name the usual combinations.

Both traits are sealed: the marker types in this module are their only implementations.

Structs§

Locked
Pages are locked into memory with mlock() (UNIX) or VirtualLock() (Windows).
NoAccess
Pages can be neither read nor written.
ReadOnly
Pages are readable but not writable.
ReadWrite
Pages are readable and writable.
Unlocked
Pages are not locked into memory.

Traits§

LockMode
Whether the pages of a Protected region are locked into memory: Locked or Unlocked.
ProtectMode
Page protection of a Protected region: ReadOnly, ReadWrite or NoAccess.