Allows to close a file without silently dropping errors
Errors can happen when closing a file, indicating that the file was not (completely) written. The standard library currently simply discards such error when the std::io::File goes out of scope.
This crate allows to close the file and handle potential errors.
use Closable;
use Write;
let mut f = create.unwrap;
f.write_all;
f.close;
The close() function consumes the File. However, on Windows, a failed close operation may be retried. For this case the returned CloseError contains the original File.