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) orVirtualLock()(Windows). - NoAccess
- Pages can be neither read nor written.
- Read
Only - Pages are readable but not writable.
- Read
Write - Pages are readable and writable.
- Unlocked
- Pages are not locked into memory.