DynList
A linked list that can have dynamically sized types in its nodes.
use Debug;
use DynList;
let mut list = new;
list.push_back_unsize;
list.push_back_unsize;
list.push_back_unsize;
println!; // ["Hello, World!", 0, [1, 2, 3, 4]]
This crate currently only works on the nightly channel.
How Does it Work?
Each node has a header, containing pointers to the previous and next nodes as well as metadata for the data.
This is modelled after ThinBox.
For Sized types, this works exactly like a regular linked list.
Features
alloc- Adds features that require thealloccrate. This includes operations specific to theGlobalallocator and sets it as the default allocator in generics.std(requiresalloc, default) - Adds features that require thestdcrate. Currently, this adds nothing, but disabling it enables theno_stdattribute.
TODO
This library is still in development and breaking changes may occur.
- Comment
unsafeblocks. - Add tests.
License
DynList is dual-licensed under either the Apache License Version 2.0 or MIT license at your option.