doc.rust-lang.org
pub mod range
Replacement range types
module
core
Stable since 1.95.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn write_volatile<T>(dst: *mut T, src: T)
Performs a volatile write of a memory location with the given value without reading or dropping the old value.
function
core
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn write_unaligned<T>(dst: *mut T, src: T)
Overwrites a memory location with the given value without reading or dropping the old value.
function
core
Stable since 1.17.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize)
Sets count * size_of::<T>() bytes of memory starting at dst to val.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn write<T>(dst: *mut T, src: T)
Overwrites a memory location with the given value without reading or dropping the old value.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn without_provenance_mut<T>(addr: usize) -> *mut T
Creates a pointer with the given address and no provenance.
function
core
Stable since 1.84.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn without_provenance<T>(addr: usize) -> *const T
Creates a pointer with the given address and no provenance.
function
core
Stable since 1.84.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn with_exposed_provenance_mut<T>(addr: usize) -> *mut T
Converts an address back to a mutable pointer, picking up some previously 'exposed' provenance.
function
core
Stable since 1.84.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn with_exposed_provenance<T>(addr: usize) -> *const T
Converts an address back to a pointer, picking up some previously 'exposed' provenance.
function
core
Stable since 1.84.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn swap_nonoverlapping<T>(x: *mut T, y: *mut T, count: usize)
Swaps count * size_of::<T>() bytes between the two regions of memory beginning at x and y. The two regions must not overlap.
function
core
Stable since 1.27.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn swap<T>(x: *mut T, y: *mut T)
Swaps the values at two mutable locations of the same type, without deinitializing either.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn slice_from_raw_parts_mut<T>(data: *mut T, len: usize) -> *mut [T]
Forms a raw mutable slice from a pointer and a length.
function
core
Stable since 1.42.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn slice_from_raw_parts<T>(data: *const T, len: usize) -> *const [T]
Forms a raw slice from a pointer and a length.
function
core
Stable since 1.42.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn replace<T>(dst: *mut T, src: T) -> T
Moves src into the pointed dst, returning the previous dst value.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn read_volatile<T>(src: *const T) -> T
Performs a volatile read of the value from src without moving it.
function
core
Stable since 1.9.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn read_unaligned<T>(src: *const T) -> T
Reads the value from src without moving it. This leaves the memory in src unchanged.
function
core
Stable since 1.17.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn read<T>(src: *const T) -> T
Reads the value from src without moving it. This leaves the memory in src unchanged.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn null_mut<T>() -> *mut T
Creates a null mutable raw pointer.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn null<T>() -> *const T
Creates a null raw pointer.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe fn write_volatile(self, val: T)
Performs a volatile write of a memory location with the given value without reading or dropping the old value.
method
core
Stable since 1.80.0
Version 1.100.0-nightly