3 releases
Uses old Rust 2015
0.1.3 | Apr 17, 2017 |
---|---|
0.1.2 | Mar 13, 2017 |
0.1.1 | Feb 28, 2017 |
0.1.0 |
|
#2426 in Data structures
22KB
585 lines
OptionVec
An abstraction over Vec<Option<T>>
, allowing insertion and removal of elements
while maintaining an element's position in the container.
Usage
[dependencies]
option_vec = "0.1"
And this to your crate root:
extern crate option_vec;
License
option_vec
is distributed under the terms of both the MIT license and the
Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.
lib.rs
:
OptionVec<T>
; an abstraction over Vec<Option<T>>
An element in an OptionVec<T>
can be accessed by index and maintains
its position when elements are removed from the container.
An element inserted into an OptionVec<T>
will occupy the first available
position in the container.