Module ptr

Source
Expand description

§Raw Pointer Implementation

This provides bitvec-internal pointer types and a mirror of the core::ptr module.

It contains the following types:

  • BitPtr is a raw-pointer to exactly one bit.
  • BitRef is a proxy reference to exactly one bit.
  • BitSpan is the encoded form of the *BitSlice pointer and &BitSlice reference. It is not publicly exposed, but it serves as the foundation of bitvec’s ability to describe memory regions.

It also provides ports of the free functions available in core::ptr, as well as some utilities for bridging ordinary Rust pointers into bitvec.

You should generally not use the contents of this module; BitSlice provides more convenience and has stronger abilities to optimize performance.

Structs§

BitPtr
Single-Bit Pointer
BitPtrRange
Bit-Pointer Range
BitRef
Proxy Bit-Reference
Const
A basic const marker.
MisalignError
The error produced when an address is insufficiently aligned to the width of its type.
Mut
A basic mut marker.

Enums§

BitPtrError
Errors produced by invalid bit-pointer components.
BitSpanError
An error produced when creating BitSpan encoded references.

Traits§

Mutability
Generalized mutability permissions.

Functions§

bitslice_from_raw_parts
Bit-Slice Pointer Construction
bitslice_from_raw_parts_mut
Bit-Slice Pointer Construction
check_alignment
Ensures that an address is well-aligned to its referent type width.
copy
Bit-wise memcpy
copy_nonoverlapping
Bit-wise memcpy
drop_in_placeDeprecated
Remote Destructor
eq
Bit-Pointer Equality
hash
Bit-Pointer Hashing
null
Bit-Pointer Sentinel Value
null_mut
Bit-Pointer Sentinel Value
read
Single-Bit Read
read_unalignedDeprecated
Single-Bit Unaligned Read
read_volatile
Single-Bit Volatile Read
replace
Single-Bit Replacement
slice_from_raw_parts
Raw Bit-Slice Pointer Construction
slice_from_raw_parts_mut
Raw Bit-Slice Pointer Construction
swap
Bit Swap
swap_nonoverlapping
Many-Bit Swap
write
Single-Bit Write
write_bits
Bit-wise memset
write_bytesDeprecated
Bit-wise memset
write_unalignedDeprecated
Single-Bit Unaligned Write
write_volatile
Single-Bit Volatile Write