Module stack_dst::buffers

source ·
Expand description

Type aliases for common buffer sizes and types

Some useful suggestions

  • [Ptr8] is the semi-standard buffer for holding a single object (a good balance of space used)
  • [Ptr2] is suitable for storing a single pointer and its vtable

Re-exports

  • pub use ::generic_array::typenum as n;

Structs

  • A buffer backing onto an array (used to provide default)
  • A buffer backing onto an array (used to provide default) - using constant generics

Type Definitions

  • One pointer, can only store the vtable
  • Two pointers, useful for wrapping a pointer along with a vtable
  • 8 pointers (32/64 bytes, with pointer alignment)
  • 16 pointers (64/128 bytes, with pointer alignment)
  • Dyanamically allocated buffer with pointer alignment
  • Dyanamically allocated buffer with 1-byte alignment
  • 32 bytes, 8-bit alignment
  • Dyanamically allocated buffer with 8-byte alignment
  • 16 bytes, 64-bit alignment
  • 64 bytes, 64-bit alignment