doc.rust-lang.org
pub const fn from_ref<T>(s: &T) -> &[T; 1]
Converts a reference to T into a reference to an array of length 1 (without copying).
function
core
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_mut<T>(s: &mut T) -> &mut [T; 1]
Converts a mutable reference to T into a mutable reference to an array of length 1 (without copying).
function
core
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn from_fn<T, const N: usize, F>(f: F) -> [T; N]
Creates an array where each element is produced by calling f with that element's index while walking forward through the array.
function
core
Stable since 1.63.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn each_ref(&self) -> [&T; N]
Borrows each element and returns an array of references with the same size as self.
method
core
Stable since 1.77.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn each_mut(&mut self) -> [&mut T; N]
Borrows each element mutably and returns an array of mutable references with the same size as self.
method
core
Stable since 1.77.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn as_slice(&self) -> &[T]
Returns a slice containing the entire array. Equivalent to &s[..].
method
core
Stable since 1.57.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn as_mut_slice(&mut self) -> &mut [T]
Returns a mutable slice containing the entire array. Equivalent to &mut s[..].
method
core
Stable since 1.57.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct TryFromSliceError
The error type returned when a conversion from a slice to an array fails.
struct
core
Stable since 1.34.0
Version 1.100.0-nightly
doc.rust-lang.org
primitive array
A fixed-size array, denoted [T; N], for the element type, T, and the non-negative compile-time constant size, N.
primitive
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod array
Utilities for the array primitive type.
module
core
Stable since 1.35.0
Version 1.100.0-nightly
doc.rust-lang.org
pub macro naked_asm!
Inline assembly used in combination with #[naked] functions.
macro
core
Stable since 1.88.0
Version 1.100.0-nightly
doc.rust-lang.org
pub macro global_asm!
Module-level inline assembly.
macro
core
Stable since 1.59.0
Version 1.100.0-nightly
doc.rust-lang.org
pub macro asm!
Inline assembly.
macro
core
Stable since 1.59.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod arch
SIMD and vendor intrinsics module.
module
core
Stable since 1.27.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn type_name_of_val<T>(_val: &T) -> &'static str
Returns the type name of the pointed-to value as a string slice.
function
core
Stable since 1.76.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn type_name<T>() -> &'static str
Returns the name of a type as a string slice.
function
core
Stable since 1.38.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn of<T>() -> TypeId
Returns the TypeId of the generic type parameter.
associated_function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct TypeId
A TypeId represents a globally unique identifier for a type.
struct
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
fn type_id(&self) -> TypeId
Gets the TypeId of self.
method
core
Stable since 1.34.0
Version 1.100.0-nightly
doc.rust-lang.org
pub trait Any
A trait to emulate dynamic typing.
trait
core
Stable since 1.0.0
Version 1.100.0-nightly