Flush and close the writer, returning any errors. This is automatically called when the writer is dropped, but calling it explicitly allows you to handle errors.
(mut self)
| 156 | /// This is automatically called when the writer is dropped, but |
| 157 | /// calling it explicitly allows you to handle errors. |
| 158 | pub fn finish(mut self) -> io::Result<()> { |
| 159 | self.writer.flush() |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | impl Write for FileWriter { |