#buffer #dynamic #paper #byte #readable #writable #p1790r0

dyn_buf

A dynamic buffer v1 (p1790r0) implement in Rust

1 unstable release

0.1.0 Jul 16, 2021

#7 in #writable

Download history 115/week @ 2023-12-04 38/week @ 2023-12-11 56/week @ 2023-12-18 53/week @ 2023-12-25 56/week @ 2024-01-01 312/week @ 2024-01-08 145/week @ 2024-01-15 100/week @ 2024-01-22 144/week @ 2024-01-29 95/week @ 2024-02-05 140/week @ 2024-02-12 115/week @ 2024-02-19 104/week @ 2024-02-26 106/week @ 2024-03-04 68/week @ 2024-03-11 55/week @ 2024-03-18

338 downloads per month
Used in 3 crates (2 directly)

MIT license

8KB
89 lines

dyn_buf_rs

A dynamic buffer v1 implement in Rust.

The dynamic buffer v1 was proposed in ISO C++ Paper p1790r0


lib.rs:

A dynamic buffer encapsulates memory storage that may be automatically resized as required, where the memory is divided into two regions: readable bytes followed by writable bytes. These memory regions are internal to the dynamic buffer, but direct access to the elements is provided to permit them to be efficiently used with I/O operations.

Note: Such as the send or receive operations of a socket. The readable bytes would be used as
the constant buffer sequence for send, and the writable bytes used as the mutable buffer
sequence for receive.

Data written to the writable bytes of a dynamic buffer object is appended to the readable bytes of the same object.

No runtime deps