bors[bot] 7685445020
Merge #170
170: Buffer methods for Vec and as_mut_vec for String r=japaric a=samlich

This adds `set_len` to `Vec`, identical to the `std` version, with the documentation copied from `std`. This is useful for using it as a buffer by writing to the uninitialized portion and then setting the length to include those bytes.

It also adds `as_mut_vec` to `String` (also from `std`), which enables using `String` as a buffer in the same manner.

Co-authored-by: samlich <1349989+samlich@users.noreply.github.com>
2020-07-31 18:31:44 +00:00
2019-04-22 21:08:26 +02:00
2019-12-17 16:36:39 +01:00
2020-07-29 21:29:05 +00:00
2020-05-04 20:59:35 +02:00
2020-05-04 20:59:35 +02:00
2017-03-05 00:30:10 -05:00
2017-03-05 00:30:10 -05:00
2020-05-09 19:46:06 +03:00

crates.io crates.io

heapless

static friendly data structures that don't require dynamic memory allocation

Documentation

Change log

Tests

# run all
cargo test --features 'serde','x86-sync-pool'
# run only for example histbuf tests
cargo test histbuf --features 'serde','x86-sync-pool'

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Description
Heapless, static friendly data structures
Readme 18 MiB
Languages
Rust 100%