zigzag-alloc 1.0.4

A collection of explicit memory allocators and collections inspired by Zig
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use zigzag_alloc::alloc::system::SystemAllocator;
use zigzag_alloc::collections::ExBox;

fn main() {
    let alloc = SystemAllocator;

    let boxed_int = ExBox::new(1337, &alloc).expect("Out of memory");

    println!("Value: {}", *boxed_int);
    
    let val = ExBox::unbox(boxed_int);
    println!("Unboxed: {}", val);
}