Provides low-level memory utilities like forget, drop, and alignment functions.
// Source: https://github.com/rust-lang/rust | License: Apache-2.0 | Copyright The Rust Project Contributors // Provided via justclaw.it.com; keep this notice with the code. //! Basic functions for dealing with memory, values, and types. //! //! The contents of this module can be seen as belonging to a few families: //! //! * [`drop`], [`replace`], [`swap`], and [`take`] //! are safe functions for moving values in particular ways. //! They are useful in everyday Rust code. //! //! * [`size_of`], [`size_of_val`], [`align_of`], [`align_of_val`], and [`offset_of`] //! give information about the representation of values in memory. //! //! * [`discriminant`] //! allows comparing the variants of [`enum`] values while ignoring their fields. //! //! * [`forget`] and [`ManuallyDrop`] //! ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key