MCPcopy Create free account
hub / github.com/devashishdxt/cli-table / write

Method write

cli-table/src/buffers.rs:55–65  ·  view source on GitHub ↗
(&mut self, buf: &[u8])

Source from the content-addressed store, hash-verified

53
54impl Write for Buffers<'_> {
55 fn write(&mut self, buf: &[u8]) -> Result<usize> {
56 if let Some(ref mut current_buffer) = self.current_buffer {
57 current_buffer.write(buf)
58 } else {
59 let mut new_buffer = self.writer.buffer();
60 let num_bytes = new_buffer.write(buf)?;
61 self.current_buffer = Some(new_buffer);
62
63 Ok(num_bytes)
64 }
65 }
66
67 fn flush(&mut self) -> std::io::Result<()> {
68 if let Some(ref mut current_buffer) = self.current_buffer {

Callers

nothing calls this directly

Calls 1

bufferMethod · 0.80

Tested by

no test coverage detected