(mut self: Box<Self>)
| 726 | } |
| 727 | |
| 728 | async fn close(mut self: Box<Self>) -> crate::Result<u64> { |
| 729 | let index_bytes = encode_delta_varints_write(&self.lengths); |
| 730 | let index_length = index_bytes.len() as i32; |
| 731 | |
| 732 | self.writer.write(Bytes::from(index_bytes)).await?; |
| 733 | self.writer |
| 734 | .write(Bytes::copy_from_slice(&index_length.to_le_bytes())) |
| 735 | .await?; |
| 736 | self.writer |
| 737 | .write(Bytes::from_static(&[BLOB_FORMAT_VERSION])) |
| 738 | .await?; |
| 739 | |
| 740 | let total = self.bytes_written + index_length as u64 + BLOB_FOOTER_SIZE; |
| 741 | self.writer.close().await?; |
| 742 | Ok(total) |
| 743 | } |
| 744 | } |
| 745 | |
| 746 | fn encode_delta_varints_write(values: &[i64]) -> Vec<u8> { |
nothing calls this directly
no test coverage detected