Module mem

Module mem 

Source
Available on crate feature core only.
Expand description

Contains mostly unsafe functions for interacting with raw memory.

Functions§

nstd_core_mem_align
Returns a pointer that is properly aligned to align based on the offset ptr.
nstd_core_mem_align_mut
Returns a pointer that is properly aligned to align based on the offset ptr.
nstd_core_mem_compare
Compares two memory buffers of num bytes.
nstd_core_mem_copy
Copies num bytes from src to dest.
nstd_core_mem_copy_overlapping
Copies num bytes from src to dest. Unlike nstd_core_mem_copy this operation can be used when the two memory buffers overlap.
nstd_core_mem_dangling
Creates a new dangling pointer to some immutable memory. The pointer is guaranteed to have valid alignment for any scalar type.
nstd_core_mem_dangling_mut
Creates a new dangling pointer to some mutable memory. The pointer is guaranteed to have valid alignment for any scalar type.
nstd_core_mem_fill
Fills the memory buffer buf with byte fill.
nstd_core_mem_is_aligned
Checks if ptr is aligned to align.
nstd_core_mem_search
Iterates through each byte in a raw memory buffer until delim is reached, returning a pointer to the delimiter byte if it is found.
nstd_core_mem_swap
Swaps num bytes between the memory buffers x and y.
nstd_core_mem_zero
Zeros out a memory buffer.