Expand description
This module implements tagged pointers.
In order to utilize the pointer packing, you must have two types: a pointer, and a tag.
The pointer must implement the Pointer trait, with the primary
requirement being convertible to and from a raw pointer. Note that the
pointer must be dereferenceable, so raw pointers generally cannot implement
the Pointer trait. This implies that the pointer must also be non-null.
Many common pointer types already implement the Pointer trait.
The tag must implement the Tag trait.
We assert that the tag and the Pointer types are compatible at compile
time.
Modulesยง
Structsยง
Traitsยง
- This describes the pointer type encapsulated by
TaggedPtrandCopyTaggedPtr. - This describes tags that the
TaggedPtrstruct can hold.
Functionsยง
- Returns the number of bits available for use for tags in a pointer to
T(this is based onTโs alignment). - Returns the correct
Tag::BITSconstant for a set of tag values.