Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc committed Sep 16, 2021
1 parent 24ca4c2 commit 0bc42ed
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions utils/zerovec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ Zero-copy vector abstractions over byte arrays.
`zerovec` enable vectors of multibyte types to be backed by a byte array, abstracting away
issues including memory alignment and endianness.

This crate has two main types:
This crate has three main types:

- `ZeroVec<T>` for fixed-width types like `u32`
- `VarZeroVec<T>` for variable-width types like `str`
- [`ZeroVec<T>`](ZeroVec) for fixed-width types like `u32`
- [`VarZeroVec<T>`](VarZeroVec) for variable-width types like `str`
- [`ZeroMap<K, V>`](ZeroMap) to map from `K` to `V`

Both are intended as drop-in replacements for `Vec<T>` in Serde structs serialized with a
format supporting a borrowed byte buffer, like Bincode. Clients upgrading from Vec to ZeroVec
or VarZeroVec benefit from zero heap allocations when deserializing read-only data.
The first two are intended as drop-in replacements for `Vec<T>` in Serde structs serialized
with a format supporting a borrowed byte buffer, like Bincode. The third is indended as a
replacement for `HashMap` or `LiteMap`. Clients upgrading to `ZeroVec`, `VarZeroVec`, or
`ZeroMap` benefit from zero heap allocations when deserializing read-only data.

This crate has two optional features: `serde` and `yoke`. `serde` allows serializing and deserializing
`zerovec`'s abstractions via [`serde`](https://docs.rs/serde), and `yoke` enables implementations of `Yokeable`
Expand Down

0 comments on commit 0bc42ed

Please sign in to comment.