Module smallbox::space [] [src]

Default size type to custom stackbox capacity

The Space type of StackBox<T, Space> is not retricted to the following types, instead, it can be any sized type or even an array. The resize() method on StackBox<T, Space> is used to transforms itself to the one of bigger capacity

Example

use smallbox::StackBox;
use smallbox::space::*;

let s = StackBox::<[usize], S8>::new([0usize; 8]).unwrap();
assert!(s.resize::<S16>().is_ok());

Structs

S2

Represent as 2 * usize space

S4

Represent as 4 * usize space

S8

Represent as 8 * usize space

S16

Represent as 16 * usize space

S32

Represent as 32 * usize space

S64

Represent as 64 * usize space