devela::sys

Module mem

Source
Expand description

Memory management.
mem::{cell}

Extends: std::{alloc, borrow, boxed, cell, mem, pin, ptr, rc, slice}


Modules§

  • Shareable mutable containers.

Macros§

  • core Create a const raw pointer to a place, without creating an intermediate reference.
  • core Create a mut raw pointer to a place, without creating an intermediate reference.
  • Swaps two mutable variables in a compile-time friendly manner.
  • core Expands to the offset in bytes of a field from the beginning of the given type.
  • core Constructs a Pin<&mut T>, by pinning a value: T locally.
  • Returns the size of an expression in bytes.

Structs§

  • Memory-allocation-related operations.
  • An archived BareBox
  • An archived Boxed
  • A no-op pointer type, like a Box but without affecting how T is stored.
  • The resolver for an archived BareBox
  • Boxalloc
    alloc A pointer type that uniquely owns a heap allocation of type T.
  • Boxedalloc
    A zero-sized marker for a Storage type that wraps its data in a Box.
  • The resolver for an archived Boxed
  • Aligns and pads a value to the length of a cache line.
  • core Opaque type representing the discriminant of an enum.
  • Represents a fat pointer with separate data and metadata pointers.
  • Layoutalloc
    alloc Layout of a block of memory.
  • alloc The parameters given to a Layout constructor did not satisfy the constraints.
  • core A wrapper to inhibit compiler from automatically calling T’s destructor.
  • Memory-related operations.
  • core A pointer which pins its pointee in place.
  • Pinnedunsafe_ptr
    A wrapper for structurally pinned data.
  • Pointer-related operations.
  • core *mut T but non-zero and covariant.
  • Rcalloc
    alloc A single-threaded reference-counting pointer.
  • RcWeakalloc
    alloc A version of Rc that holds a non-owning reference to the managed allocation.
  • Slice-related operations, most of them const.

Enums§

  • Cowalloc
    alloc A clone-on-write smart pointer.

Traits§

  • Type size information in bits.
  • core A trait for borrowing data.
  • core A trait for mutably borrowing data.
  • Type size information in bytes.
  • Extension trait for type memory information and manipulation.
  • Extension trait providing additional methods for &[T].
  • Extension trait providing additional methods for &mut [T].
  • alloc
  • Marker trait to verify memory alignment between two types.
  • MemPodunsafe_layout
    Indicates a type is Plain Old Data, and meets specific memory layout guarantees.
  • core Types with a constant size known at compile time.
  • Allows to be generic in respect of the data storage.
  • ToOwnedalloc
    alloc A generalization of Clone to borrowed data.

Functions§

  • Returns the rounded up size in bytes from a size in bits.
  • transmuteDeprecated
    core Reinterprets the bits of a value of one type as another type.

Type Aliases§

Unions§

  • core A wrapper type to construct uninitialized instances of T.