doc.rust-lang.org
pub mod rust_2024
The 2024 version of the core prelude.
module
core
Stable since 1.85.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod rust_2021
The 2021 version of the core prelude.
module
core
Stable since 1.55.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod rust_2018
The 2018 version of the core prelude.
module
core
Stable since 1.55.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod rust_2015
The 2015 version of the core prelude.
module
core
Stable since 1.55.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod prelude
The core prelude
module
core
Stable since 1.4.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const 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.26.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn write_unaligned(self, val: T)
Overwrites a memory location with the given value without reading or dropping the old value.
method
core
Stable since 1.26.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn write_bytes(self, val: u8, count: usize)
Invokes memset on the specified pointer, setting count * size_of::<T>() bytes of memory starting at self to val.
method
core
Stable since 1.26.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn write(self, val: T)
Overwrites a memory location with the given value without reading or dropping the old value.
method
core
Stable since 1.26.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_sub(self, count: usize) -> Self
Subtracts an unsigned offset from a pointer using wrapping arithmetic.
method
core
Stable since 1.26.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_offset(self, count: isize) -> *const T
Adds a signed offset to a pointer using wrapping arithmetic.
method
core
Stable since 1.16.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_byte_sub(self, count: usize) -> Self
Subtracts an unsigned offset in bytes from a pointer using wrapping arithmetic.
method
core
Stable since 1.75.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_byte_offset(self, count: isize) -> Self
Adds a signed offset in bytes to a pointer using wrapping arithmetic.
method
core
Stable since 1.75.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_byte_add(self, count: usize) -> Self
Adds an unsigned offset in bytes to a pointer using wrapping arithmetic.
method
core
Stable since 1.75.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn wrapping_add(self, count: usize) -> Self
Adds an unsigned offset to a pointer using wrapping arithmetic.
method
core
Stable since 1.26.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn with_addr(self, addr: usize) -> Self
Creates a new pointer with the given address and the provenance of self.
method
core
Stable since 1.84.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn swap(self, with: *mut T)
Swaps the values at two mutable locations of the same type, without deinitializing either. They may overlap, unlike mem::swap which is otherwise equivalent.
method
core
Stable since 1.26.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn sub(self, count: usize) -> Self
Subtracts an unsigned offset from a pointer.
method
core
Stable since 1.26.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn replace(self, src: T) -> T
Replaces the value at self with src, returning the old value, without dropping either.
method
core
Stable since 1.26.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn read_volatile(self) -> T
Performs a volatile read of the value from self without moving it. This leaves the memory in self unchanged.
method
core
Stable since 1.26.0
Version 1.100.0-nightly