Flush and sync the currently written-to segment (if any) to disk. Dropping a [`StreamWriter`] will attempt to invoke this, but any errors will not be visible. Also, if the async runtime is already shutting down, the task spawned by the [`Drop`] impl may not get a chance to run.
(&mut self)
| 263 | /// will not be visible. Also, if the async runtime is already shutting down, |
| 264 | /// the task spawned by the [`Drop`] impl may not get a chance to run. |
| 265 | pub async fn sync_all(&mut self) -> io::Result<()> { |
| 266 | let Some(current_segment) = self.current_segment.as_mut() else { |
| 267 | return Ok(()); |
| 268 | }; |
| 269 | current_segment.flush_and_sync().await |
| 270 | } |
| 271 | |
| 272 | async fn append_all_inner( |
| 273 | &mut self, |