#abstraction #buffer #reader

buffer

Safe, write-only, generics-free buffer abstraction

10 releases

Uses old Rust 2015

0.1.9 Mar 6, 2021
0.1.8 Jul 12, 2017
0.1.7 Mar 26, 2017
0.1.6 Jul 21, 2016
0.1.4 Mar 20, 2016

#1230 in Rust patterns

Download history 123/week @ 2024-12-09 84/week @ 2024-12-16 53/week @ 2024-12-23 30/week @ 2024-12-30 61/week @ 2025-01-06 67/week @ 2025-01-13 122/week @ 2025-01-20 45/week @ 2025-01-27 150/week @ 2025-02-03 90/week @ 2025-02-10 76/week @ 2025-02-17 128/week @ 2025-02-24 75/week @ 2025-03-03 114/week @ 2025-03-10 186/week @ 2025-03-17 126/week @ 2025-03-24

512 downloads per month
Used in 20 crates (12 directly)

MIT/Apache

20KB
418 lines

buffer

buffer provides safe, write-only and generics-free byte buffers that can be used without initializing them first.

Example

let mut vec = Vec::with_capacity(1024);
if try!(reader.read_buffer(&mut vec)).len() != 0 {
    if vec[0] == 0 {
        // ...
    }
}

Dependencies

~86KB