Skip to content

Commit db8dfde

Browse files
committed
docs: Short elaboration for each cargo-feature
1 parent 45d8619 commit db8dfde

4 files changed

Lines changed: 50 additions & 11 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ directories.
1717
it has a smaller inline-size; the inline data is a thin pointer like thin-vec.
1818

1919
`SlimVec` implements as much of the API surface of `Vec` as possible.
20+
Additionally includes optional features for `arbitrary`, `borsh`, `comparable`,
21+
`serde`, & `valuable`.
2022

2123
- [Overview](slimvec/docs/Overview.md)
2224
- [Features](slimvec/docs/Features.md)

slimvec/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
it has a smaller inline-size; the inline data is a thin pointer like thin-vec.
1212

1313
`SlimVec` implements as much of the API surface of `Vec` as possible.
14+
Additionally includes optional features for `arbitrary`, `borsh`, `comparable`,
15+
`serde`, & `valuable`.
1416

1517
- [Overview](docs/Overview.md)
1618
- [Features](docs/Features.md)

slimvec/docs/Features.md

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,60 @@
11
The `slimvec` package includes the following cargo-features:
22

3-
### `std`
4-
5-
Enables `std::io::Write` for `SlimVec<u8>`.
63

74
### `arbitrary`
85

9-
Enables support for [`arbitrary`].
10-
116
[`arbitrary`]: https://crates.io/crates/arbitrary
127

13-
### `serde`
8+
Enables support for constructing arbitrary values via [`arbitrary`].
9+
10+
- Adds implementation of `arbitrary::Arbitrary` for `SlimVec<T: Arbitrary>`.
11+
12+
13+
### `borsh`
14+
15+
[`borsh`]: https://crates.io/crates/borsh
16+
17+
Enables support for serialisation & deserialisation via [`borsh`].
18+
19+
- Adds implementation of `borsh::BorshSerialize` for
20+
`SlimVec<T: BorshSerialize>`.
21+
- Adds implementation of `borsh::BorshDeserialize` for
22+
`SlimVec<T: BorshDeserialize>`.
23+
24+
25+
### `comparable`
26+
27+
[`comparable`]: https://crates.io/crates/comparable
28+
29+
Enables support for structural comparison via [`comparable`].
30+
31+
- Adds implementation of `comparable::Comparable` for `SlimVec<T: Comparable>`.
1432

15-
Enables serialisation and deserialisation via [`serde`].
33+
34+
### `serde`
1635

1736
[`serde`]: https://crates.io/crates/serde
1837

19-
### `valuable`
38+
Enables support for serialisation & deserialisation via [`serde`].
39+
40+
- Adds implementation of `serde::Serialize` for `SlimVec<T: Serialize>`.
41+
- Adds implementation of `serde::Deserialize` for `SlimVec<T: Deserialize>`.
42+
43+
44+
### `std`
2045

21-
Enables value inspect via [`valuable`].
46+
[Rust Standard Library]: https://doc.rust-lang.org/std
47+
48+
Enables support for sinking byte streams via the [Rust Standard Library].
49+
50+
- Adds implementation of `std::io::Write` for `SlimVec<u8>`.
51+
52+
53+
### `valuable`
2254

2355
[`valuable`]: https://crates.io/crates/valuable
56+
57+
Enables dyn-compatible value inspection via [`valuable`].
58+
59+
- Adds implementation of `valuable::Valuable` for `SlimVec<T: Valuable>`.
60+
- Adds implementation of `valuable::Listable` for `SlimVec<T: Valuable>`.

slimvec/docs/Future-work.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,3 @@ one-another.
55

66
In the future `SlimVec` would like to add support for the currently unstable
77
Rust features `allocator-api` & `#[may_dangle]`.
8-
9-
Support for ecosystem Traits, e.g. serialisation, is also desirable.

0 commit comments

Comments
 (0)