Module bitvec::access[][src]

Memory access guards.

bitvec allows a program to produce handles over memory that do not logically alias their bits, but may alias in hardware. This module provides a unified interface for memory accesses that can be specialized to handle aliased and unaliased access events.

The BitAccess trait provides capabilities to access bits in memory elements through shared references, and its implementations are responsible for coördinating synchronization and contention as needed.

The BitSafe trait abstracts over wrappers to the Cell and atomic types that forbid writing through their references, even when other references to the same location may write.

Structs

BitSafeU8

A wrapper over a shared-mutable type that forbids writing to the location through its own reference. Other references to the location may still write to it, and reads from this reference will be aware of this possibility.

BitSafeU16

A wrapper over a shared-mutable type that forbids writing to the location through its own reference. Other references to the location may still write to it, and reads from this reference will be aware of this possibility.

BitSafeU32

A wrapper over a shared-mutable type that forbids writing to the location through its own reference. Other references to the location may still write to it, and reads from this reference will be aware of this possibility.

BitSafeU64

A wrapper over a shared-mutable type that forbids writing to the location through its own reference. Other references to the location may still write to it, and reads from this reference will be aware of this possibility.

BitSafeUsize

A wrapper over a shared-mutable type that forbids writing to the location through its own reference. Other references to the location may still write to it, and reads from this reference will be aware of this possibility.

Traits

BitAccess

Abstracts over the instructions used when accessing a memory location.

BitSafe

Restricts memory modification to only exclusive references.