doc.rust-lang.org
pub const unsafe fn from_size_align_unchecked(size: usize, align: usize) -> Self
Creates a layout, bypassing all checks.
associated_function
core
Stable since 1.28.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn new<T>() -> Self
Constructs a Layout suitable for holding a value of type T.
associated_function
core
Stable since 1.28.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn pad_to_align(&self) -> Layout
Creates a layout by rounding the size of this layout up to a multiple of the layout's alignment.
method
core
Stable since 1.44.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn repeat(&self, n: usize) -> Result<(Self, usize), LayoutError>
Creates a layout describing the record for n instances of self, with a suitable amount of padding between each to ensure that each instance is given its requested size and alignment. On success, returns (k, offs) where k is the layout of the array and offs is the distance between the start of each element in the array.
method
core
Stable since 1.95.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn repeat_packed(&self, n: usize) -> Result<Self, LayoutError>
Creates a layout describing the record for n instances of self, with no padding between each instance.
method
core
Stable since 1.95.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn size(&self) -> usize
The minimum size in bytes for a memory block of this layout.
method
core
Stable since 1.28.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct LayoutError
The LayoutError is returned when the parameters given to Layout::from_size_align or some other Layout constructor do not satisfy its documented constraints.
struct
core
Stable since 1.50.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod any
Utilities for dynamic typing or type reflection.
module
core
Stable since 1.0.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
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 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
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 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 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 mod arch
SIMD and vendor intrinsics module.
module
core
Stable since 1.27.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 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 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 mod array
Utilities for the array primitive type.
module
core
Stable since 1.35.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