doc.rust-lang.org
pub mod marker
Primitive traits and types representing basic properties of types.
module
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
derive #[derive(Copy)]
Derive macro generating an impl of the trait Copy.
derive_macro
core
Stable since 1.38.0
Version 1.100.0-nightly
doc.rust-lang.org
pub trait Copy
Types whose values can be duplicated simply by copying bits.
trait
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct PhantomData<T>
Zero-sized type used to mark things that "act like" they own a T.
struct
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct PhantomPinned
A marker type which does not implement Unpin.
struct
core
Stable since 1.33.0
Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe auto trait Send
Types that can be transferred across thread boundaries.
trait
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub trait Sized
Types with a constant size known at compile time.
trait
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe auto trait Sync
Types for which it is safe to share references between threads.
trait
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub auto trait Unpin
Types that do not require any pinning guarantees.
trait
core
Stable since 1.33.0
Version 1.100.0-nightly
doc.rust-lang.org
pub macro matches!
Returns whether the given expression matches the provided pattern.
macro
core
Stable since 1.42.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod mem
Basic functions for dealing with memory, values, and types.
module
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Discriminant<T>
Opaque type representing the discriminant of an enum.
struct
core
Stable since 1.21.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn align_of<T>() -> usize
Returns the ABI-required minimum alignment of a type, in bytes.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn align_of_val<T>(val: &T) -> usize
Returns the ABI-required minimum alignment of the type of the value that val points to, in bytes.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn align_of_val_raw<T>(val: *const T) -> usize
Returns the ABI-required minimum alignment of the type of the value that val points to, in bytes.
function
core
Stable since 1.100.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn discriminant<T>(v: &T) -> Discriminant<T>
Returns a value uniquely identifying the enum variant in v.
function
core
Stable since 1.21.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn drop<T>(_x: T)
Disposes of a value.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn forget<T>(t: T)
Takes ownership and "forgets" about the value without running its destructor.
function
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct ManuallyDrop<T>
A wrapper to inhibit the compiler from automatically calling T’s destructor. This wrapper is 0-cost.
struct
core
Stable since 1.20.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn drop(slot: &mut ManuallyDrop<T>)
Manually drops the contained value.
associated_function
core
Stable since 1.20.0
Version 1.100.0-nightly