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 read_unaligned(self) -> T
Reads 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
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.26.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn offset_from_unsigned(self, origin: *const 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: *const 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.47.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn offset(self, count: isize) -> *const T
Adds a signed offset to a pointer.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn map_addr(self, f: impl FnOnce(usize) -> 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 raw slice.
method core Stable since 1.79.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_null(self) -> bool
Returns true if the pointer is null.
method core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn is_empty(self) -> bool
Returns true if the raw slice has a length of 0.
method core Stable since 1.79.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn is_aligned(self) -> bool
Returns whether the pointer is properly aligned for T.
method core Stable since 1.79.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn expose_provenance(self) -> usize
Exposes the "provenance" part of the pointer for future use in with_exposed_provenance and returns the "address" portion.
method core Stable since 1.84.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn drop_in_place(self)
Executes the destructor (if any) of the pointed-to value.
method core Stable since 1.26.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn copy_to_nonoverlapping(self, dest: *mut T, count: usize)
Copies count * size_of::<T>() bytes from self to dest. The source and destination may not overlap.
method core Stable since 1.26.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn copy_to(self, dest: *mut T, count: usize)
Copies count * size_of::<T>() bytes from self to dest. The source and destination may overlap.
method core Stable since 1.26.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn copy_from_nonoverlapping(self, src: *const T, count: usize)
Copies count * size_of::<T>() bytes from src to self. The source and destination may not overlap.
method core Stable since 1.26.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn copy_from(self, src: *const T, count: usize)
Copies count * size_of::<T>() bytes from src to self. The source and destination may overlap.
method core Stable since 1.26.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn cast_mut(self) -> *mut T
Changes constness without changing the type.
method core Stable since 1.65.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn cast_const(self) -> *const T
Changes constness without changing the type.
method core Stable since 1.65.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn cast<U>(self) -> *const U
Casts to a pointer of another type.
method core Stable since 1.38.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn byte_sub(self, count: usize) -> Self
Subtracts an unsigned offset in bytes from a pointer.
method core Stable since 1.75.0 Version 1.100.0-nightly
"This is the difference in approaches of the two languages. In C++ if the code is vulnerable, the blame is on the programmer. In Rust if the code is vu..."

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.