|
faio
faio 公共 C++ 接口参考
|
区分已初始化范围与剩余可写空间的借用读缓冲视图。 更多...
Public 成员函数 | |
| read_buf (std::span< char > storage, std::size_t initialized=0) | |
| 构造read_buf对象。 | |
| std::span< const char > | filled () const noexcept |
| 取得读缓冲中已经初始化的范围。 | |
| std::span< char > | unfilled () noexcept |
| 取得读缓冲尚可写入的尾部。 | |
| std::size_t | size () const noexcept |
| 取得已初始化或有效范围的长度。 | |
| std::size_t | capacity () const noexcept |
| 取得缓冲区全部可用容量。 | |
| void | advance (std::size_t bytes) |
| 推进读缓冲已经初始化的范围。 | |
| void | clear () noexcept |
| 将有效范围清空。 | |
区分已初始化范围与剩余可写空间的借用读缓冲视图。
|
explicit |
构造read_buf对象。
| storage | 借用的原始字节存储空间,在视图和异步操作期间保持有效。 |
| initialized | 已经初始化的有效字节数,不得超过提供的存储空间。 默认值:0。 |
|
noexcept |
取得读缓冲中已经初始化的范围。
|
noexcept |
取得读缓冲尚可写入的尾部。
|
noexcept |
取得已初始化或有效范围的长度。
|
noexcept |
取得缓冲区全部可用容量。
| void faio::io::read_buf::advance | ( | std::size_t | bytes | ) |
推进读缓冲已经初始化的范围。
| bytes | 可写字节缓冲区;在操作完成前保持内存与地址有效,不能被其他任务无序修改。 |
|
noexcept |
将有效范围清空。