MCPcopy Create free account
hub / github.com/apache/paimon-rust / write_bytes

Method write_bytes

crates/paimon/src/btree/sst_file.rs:72–79  ·  view source on GitHub ↗

Write bytes to the underlying writer and track position.

(&mut self, data: &[u8])

Source from the content-addressed store, hash-verified

70
71 /// Write bytes to the underlying writer and track position.
72 async fn write_bytes(&mut self, data: &[u8]) -> io::Result<()> {
73 self.writer
74 .write(Bytes::copy_from_slice(data))
75 .await
76 .map_err(|e| io::Error::other(e.to_string()))?;
77 self.bytes_written += data.len() as u64;
78 Ok(())
79 }
80
81 /// Put a key-value pair. Keys must be monotonically increasing.
82 pub async fn put(&mut self, key: &[u8], value: &[u8]) -> io::Result<()> {

Callers 3

write_block_dataMethod · 0.80
write_index_blockMethod · 0.80
write_rawMethod · 0.80

Calls 2

writeMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected