Struct hds::Kv [−][src]
pub struct Kv<K, H, S> { /* fields omitted */ }
Expand description
Key-Value store
Uses the following memory layout:
|------|--------|---------------|---------------|----
| size | amount | key|size|data | key|size|data | ...
|------|--------|---------------|---------------|----
| header | value | value | ...
|---------------|---------------|---------------|----
The “header” is 8 bytes and consists of a size, and an amount. Every value has its own header which consists of a key and size totaling 8 bytes. Data is dynamically sized.
Implementations
Create a new Key-Value store on the heap backed by a Vec. Uses the default hasher from the stdlib.
Forget a value. Memory is not returned. This just frees up the key/type.
Trait Implementations
Auto Trait Implementations
impl<K, H, S> RefUnwindSafe for Kv<K, H, S> where
H: RefUnwindSafe,
K: RefUnwindSafe,
S: RefUnwindSafe,
impl<K, H, S> UnwindSafe for Kv<K, H, S> where
H: UnwindSafe,
K: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more