Available on crate feature
core only.Expand description
Contains mostly unsafe functions for interacting with raw memory.
Functions
- Returns a pointer that is properly aligned to
alignbased on the offsetptr. - Returns a pointer that is properly aligned to
alignbased on the offsetptr. - Compares two memory buffers of
numbytes. - Copies
numbytes fromsrctodest. - Copies
numbytes fromsrctodest. Unlikenstd_core_mem_copythis operation can be used when the two memory buffers overlap. - Creates a new dangling pointer to some immutable memory. The pointer is guaranteed to have valid alignment for any scalar type.
- Creates a new dangling pointer to some mutable memory. The pointer is guaranteed to have valid alignment for any scalar type.
- Fills the memory buffer
bufwith bytefill. - Checks if
ptris aligned toalign. - Iterates through each byte in a raw memory buffer until
delimis reached, returning a pointer to the delimiter byte if it is found. - Swaps
numbytes between the memory buffersxandy. - Zeros out a memory buffer.