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

dyn_buf

A dynamic buffer v1 (p1790r0) implement in Rust

1 个不稳定版本

0.1.0 2021年7月16日

#9 in #writable

Download history 59/week @ 2024-04-25 55/week @ 2024-05-02 152/week @ 2024-05-09 136/week @ 2024-05-16 476/week @ 2024-05-23 123/week @ 2024-05-30 308/week @ 2024-06-06 158/week @ 2024-06-13 324/week @ 2024-06-20 206/week @ 2024-06-27 234/week @ 2024-07-04 243/week @ 2024-07-11 108/week @ 2024-07-18 84/week @ 2024-07-25 179/week @ 2024-08-01 647/week @ 2024-08-08

1,082 monthly downloads
用于 3 crates (2 directly)

MIT 许可证

8KB
89

dyn_buf_rs

A dynamic buffer v1 implement in Rust.

动态缓冲区v1是在ISO C++ Paper p1790r0中提出的。


lib.rs:

动态缓冲区封装了可能根据需要自动调整大小的内存存储,其中内存分为两个区域:可读字节随后是可写字节。这些内存区域是动态缓冲区内部的,但提供了对元素的直接访问,以便它们可以有效地用于I/O操作。

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.

写入动态缓冲区对象的可写字节的数据将被追加到同一对象的可读字节。

无运行时依赖