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 0 | 0 | 0 |
| 0.3.0 | 0 | 0 | 0 | 0 | 0 |
| 0.2.0 | 0 | 0 | 0 | 0 | 0 |
| 0.1.3 | 0 | 0 | 0 | 0 | 0 |
| 0.1.2 | 0 | 0 | 0 | 0 | 0 |
| 0.1.1 | 0 | 0 | 0 | 0 | 0 |
| 0.1.0 | 0 | 0 | 0 | 0 | 0 |
| 0.0.7 | 0 | 0 | 0 | 0 | 0 |
4.1.0 - This version is safe to use because it has no known security vulnerabilities at this time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
MIT - MIT LicenseForked version of index_vec.
This crate provides several optional features:
rayon - Enables parallel iteration support via Rayonserde - Enables serialization/deserialization support via Serdenonmax - Enables define_nonmax_u32_index_type! macro for memory-efficient index types using NonMaxU32
Add this to your Cargo.toml:
[dependencies]
oxc_index = "3.1"
# Enable optional features as needed:
# oxc_index = { version = "3.1", features = ["serde", "nonmax"] }use oxc_index::{IndexVec, define_index_type};
define_index_type! {
pub struct MyIdx = u32;
}
let mut vec: IndexVec<MyIdx, &str> = IndexVec::new();
let idx = vec.push("hello");
assert_eq!(vec[idx], "hello");The define_nonmax_u32_index_type! macro creates index types backed by NonMaxU32,
which uses the niche optimization to store Option<MyIdx> in the same space as MyIdx:
use oxc_index::{IndexVec, define_nonmax_u32_index_type};
define_nonmax_u32_index_type! {
pub struct CompactIdx;
}
// Option<CompactIdx> is the same size as CompactIdx (4 bytes)
assert_eq!(
std::mem::size_of::<CompactIdx>(),
std::mem::size_of::<Option<CompactIdx>>()
);
let mut vec: IndexVec<CompactIdx, String> = IndexVec::new();
let idx = vec.push("world".to_string());All index types and IndexVec automatically support Serde serialization when the serde feature is enabled:
use oxc_index::{IndexVec, define_index_type};
use serde::{Serialize, Deserialize};
define_index_type! {
pub struct MyIdx = u32;
}
#[derive(Serialize, Deserialize)]
struct MyData {
items: IndexVec<MyIdx, String>,
}Compared to the original index_vec:
rayon feature - Parallel iteration supportserde feature - Automatic serialization support using the crate's own serde dependencynonmax feature - Memory-efficient index types with define_nonmax_u32_index_type! macroconst fn where possible#[ast], #[estree(skip)], etc.