Expand description
The parameterized invariants of a [Ptr][super::Ptr].
Invariants are encoded as (Aliasing, Alignment, Validity)
triples implementing the Invariants trait.
Enums§
- Aligned
- The referent is aligned: for
Ptr<T>, the referent’s address is a multiple of theT’s alignment. - AsInitialized
- The byte ranges initialized in
Tare also initialized in the referent of aPtr<T>. - Because
Exclusive 👻 - Unsynchronized reads are permitted because only one live
Ptror reference may exist to the referent bytes at a time. - Because
Immutable 👻 - Unsynchronized reads are permitted because no live
Ptrs or references permit interior mutation. - Exclusive
- The
Ptr<'a, T>adheres to the aliasing rules of a&'a mut T. - Initialized
- The byte ranges in the referent are fully initialized. In other words, if
the referent is
Nbytes long, then it contains a bit-valid[u8; N]. - Shared
- The
Ptr<'a, T>adheres to the aliasing rules of a&'a T. - Unaligned
- It is unknown whether the pointer is aligned.
- Uninit
- Any bit pattern is allowed in the
Ptr’s referent, including uninitialized bytes. - Valid
- The referent of a
Ptr<T>is valid forT, upholding bit validity and any library safety invariants.
Traits§
- Aliasing
- The aliasing invariant of a [
Ptr][super::Ptr]. - Alignment
- The alignment invariant of a [
Ptr][super::Ptr]. - Castable
From - Safety
- Invariants
- The invariants of a [
Ptr][super::Ptr]. - Read
Ptrreferents that permit unsynchronized read operations.- Reference
- An
Aliasinginvariant which is eitherSharedorExclusive. - Validity
- The validity invariant of a [
Ptr][super::Ptr].