Registry / utility / linear-map

linear-map

JSON →
library1.2.0rscratesunverified

A map implemented by searching linearly in a vector, suitable for small collections.

# Cargo.toml [dependencies] linear-map = "1.2.0"
INSTALL
IMPORT
SIG · LINEAR-MAP
L
linear-map
utilityrustv1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

LinearMap
use linear_map::LinearMap;

Creates a linear map and inserts a key-value pair.

use linear_map::LinearMap; fn main() { let mut map = LinearMap::new(); map.insert("key", 42); println!("{:?}", map.get(&"key")); }
Debug
Known issues
gotchaLinear search means O(n) lookup; not suitable for large collections.
fix
Use HashMap or BTreeMap for larger datasets.
affects: >=0.0.0
Upgrade
Version history
1.2.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
linear-map — cargo add linear-map · libregistry