Module indexing::pointer
[−]
[src]
Pointer-based inbounds intervals and element references.
These are safe abstractions built upon raw pointers instead of indices. Which choice of Range, PRange or PSlice generates best code depends on the algorithm.
All element read/write access still goes through a nominal borrow of the container with the correct brand; this ensures the usual & vs &mut borrowing rules apply.
The pointer type PIndex
has a proof parameter just like the range;
this allows us to represent the one-past-the-end pointer.
Structs
PIndex |
|
PRange |
|
PRangeIter |
Pointer range iterator, yields |
PSlice |
|
Traits
ContainerRef |
A reference to a |
PointerRange |
Unsafe because: Must only be implemented by a range branded by |
Functions
zip |
Pointer-based zip (lock step iteration) of two ranges from two containers. |