Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
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.80.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.80.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.80.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn without_provenance(addr: NonZero<usize>) -> Self
Creates a pointer with the given address and no provenance.
associated_function core Stable since 1.89.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn with_exposed_provenance(addr: NonZero<usize>) -> Self
Converts an address back to a mutable pointer, picking up some previously 'exposed' provenance.
associated_function core Stable since 1.89.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn with_addr(self, addr: NonZero<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: NonNull<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.80.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.80.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn slice_from_raw_parts(data: NonNull<T>, len: usize) -> Self
Creates a non-null raw slice from a thin pointer and a length.
associated_function core Stable since 1.70.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.80.0 Version 1.100.0-nightly
doc.rust-lang.org
pub 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.80.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn read_unaligned(self) -> T
Reads the value from self without moving it. This leaves the memory in self unchanged.
method core Stable since 1.80.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn read(self) -> T
Reads the value from self without moving it. This leaves the memory in self unchanged.
method core Stable since 1.80.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn offset_from_unsigned(self, subtracted: NonNull<T>) -> usize
Calculates the distance between two pointers within the same allocation, where it's known that self is equal to or greater than origin. The returned value is in units of T: the distance in bytes is divided by size_of::<T>().
method core Stable since 1.87.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn offset_from(self, origin: NonNull<T>) -> isize
Calculates the distance between two pointers within the same allocation. The returned value is in units of T: the distance in bytes divided by size_of::<T>().
method core Stable since 1.80.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn offset(self, count: isize) -> Self
Adds a signed offset to a pointer.
method core Stable since 1.80.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn new_unchecked(ptr: *mut T) -> Self
Creates a new NonNull.
associated_function core Stable since 1.25.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn new(ptr: *mut T) -> Option<Self>
Creates a new NonNull if ptr is non-null.
associated_function core Stable since 1.25.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn map_addr(self, f: impl FnOnce(NonZero<usize>) -> NonZero<usize>) -> Self
Creates a new pointer by mapping self's address to a new one, preserving the provenance of self.
method core Stable since 1.84.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn len(self) -> usize
Returns the length of a non-null raw slice.
method core Stable since 1.63.0 Version 1.100.0-nightly
"With Bevy clearly being an extended test suite for Rust's trait solver, how did you get the idea to also turn it into a game engine? Every sufficientl..."

Search tips

Type anything to search across articles, videos (including conference talks), podcasts, research, crates, and Rust API documentation. These operators give you finer control — click an example to try it.

Find pages containing all your words. Pages where the words appear together rank higher.
Quote part of your query to keep those words together as an exact phrase within a larger search.
Wrap the whole query in quotes for a verbatim search that matches text exactly, punctuation and all — perfect for Rust syntax. Needs at least 3 characters.
Put ! first to open the top result immediately. Quote the whole query for a literal leading bang, as in '!Send'. Bangs elsewhere, such as println!, stay literal. Browser and launcher shortcuts can invoke this directly. See search integrations.
Limit results to a single site. Works on its own () too. One site: per search.

Use the tabs and filters above the results to narrow by content type, publication year, and sort order.