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 byte_offset_from_unsigned<U>(self, origin: *const U) -> 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 bytes.
method core Stable since 1.87.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn byte_offset_from<U>(self, origin: *const U) -> isize
Calculates the distance between two pointers within the same allocation. The returned value is in units of bytes.
method core Stable since 1.75.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn byte_offset(self, count: isize) -> Self
Adds a signed offset in bytes to a pointer.
method core Stable since 1.75.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn byte_add(self, count: usize) -> Self
Adds an unsigned offset in bytes to a pointer.
method core Stable since 1.75.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn as_ref_unchecked<'a>(self) -> &'a T
Returns a shared reference to the value behind the pointer. If the pointer may be null or the value may be uninitialized, as_uninit_ref must be used instead. If the pointer may be null, but the value is known to have been initialized, as_ref must be used instead.
method core Stable since 1.95.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn as_ref<'a>(self) -> Option<&'a T>
Returns None if the pointer is null, or else returns a shared reference to the value wrapped in Some. If the value may be uninitialized, as_uninit_ref must be used instead. If the value is known to be non-null, as_ref_unchecked can be used instead.
method core Stable since 1.9.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn as_mut_unchecked<'a>(self) -> &'a mut T
Returns a unique reference to the value behind the pointer. If the pointer may be null or the value may be uninitialized, as_uninit_mut must be used instead. If the pointer may be null, but the value is known to have been initialized, as_mut must be used instead.
method core Stable since 1.95.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn as_mut_array<const N: usize>(self) -> Option<*mut [T; N]>
Gets a raw, mutable pointer to the underlying array.
method core Stable since 1.93.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn as_mut<'a>(self) -> Option<&'a mut T>
Returns None if the pointer is null, or else returns a unique reference to the value wrapped in Some. If the value may be uninitialized, as_uninit_mut must be used instead. If the value is known to be non-null, as_mut_unchecked can be used instead.
method core Stable since 1.9.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn as_array<const N: usize>(self) -> Option<*const [T; N]>
Gets a raw pointer to the underlying array.
method core Stable since 1.93.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn align_offset(self, align: usize) -> usize
Computes the offset that needs to be applied to the pointer in order to make it aligned to align.
method core Stable since 1.36.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn addr(self) -> usize
Gets the "address" portion of the pointer.
method core Stable since 1.84.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn add(self, count: usize) -> Self
Adds an unsigned offset to a pointer.
method core Stable since 1.26.0 Version 1.100.0-nightly
doc.rust-lang.org
primitive pointer
Raw, unsafe pointers, *const T, and *mut T.
primitive core Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub macro pin!
Constructs a Pin<&mut T>, by pinning a value: T locally.
macro core Stable since 1.68.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn static_ref(r: &'static T) -> Pin<&'static T>
Gets a pinning reference from a &'static reference.
associated_function core Stable since 1.61.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn static_mut(r: &'static mut T) -> Pin<&'static mut T>
Gets a pinning mutable reference from a static mutable reference.
associated_function core Stable since 1.61.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn set(&mut self, value: <Ptr as >::Target)
Assigns a new value to the memory location pointed to by the Pin<Ptr>.
method core Stable since 1.33.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn new_unchecked(pointer: Ptr) -> Pin<Ptr>
Constructs a new Pin<Ptr> around a reference to some data of a type that may or may not implement Unpin.
associated_function core Stable since 1.33.0 Version 1.100.0-nightly
doc.rust-lang.org
pub const fn new(pointer: Ptr) -> Pin<Ptr>
Constructs a new Pin<Ptr> around a pointer to some data of a type that implements Unpin.
associated_function core Stable since 1.33.0 Version 1.100.0-nightly
"Although rusting is generally a negative aspect of iron, a particular form of rusting, known as “stable rust,” causes the object to have a thin co..."

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.