A buffered wrapper around a writer, reducing the number of write syscalls.
More...
|
| | BufWriter (W inner, usize capacity=DEFAULT_BUF_SIZE) |
| | Creates a new BufWriter with the specified buffer capacity.
|
| |
|
auto | get_ref () const noexcept -> const W & |
| | Returns a reference to the underlying writer.
|
| |
|
auto | get_mut () noexcept -> W & |
| | Returns a mutable reference to the underlying writer.
|
| |
|
auto | capacity () const noexcept -> usize |
| | Returns the total capacity of the internal buffer.
|
| |
|
auto | buffer () const noexcept -> slice< u8 > |
| | Returns a slice of the buffered data that has not yet been flushed.
|
| |
|
auto | into_inner () &&-> W |
| | Consumes this BufWriter, flushing and returning the underlying writer.
|
| |
|
|
struct | rstd::Impl< io::Write, BufWriter< W > > |
| |
|
struct | rstd::Impl< io::Seek, BufWriter< W > > |
| |
template<typename W>
requires Impled<W,
io::Write>
class rstd::io::BufWriter< W >
A buffered wrapper around a writer, reducing the number of write syscalls.
- Template Parameters
-
| W | The underlying writer type, which must implement io::Write. |
◆ BufWriter()
Creates a new BufWriter with the specified buffer capacity.
- Parameters
-
| inner | The underlying writer. |
| capacity | The buffer size in bytes (defaults to DEFAULT_BUF_SIZE). |
The documentation for this class was generated from the following file:
- /home/runner/work/rstd/rstd/src/std/io/buffered.cppm