Crate close_err

source ·
Expand description

Exposes a close method on files, to permit finer grained error handling.

use close_err::Closable;
use std::{fs::File, io::Write};

let mut f = File::create("abc.txt").unwrap();
f.write_all("hello".as_bytes());
f.close().unwrap();

Traits