pub trait FileSync {
// Required method
fn fsync(&mut self) -> Result<()>;
}
Expand description
A trait for flushing the contents of a file to disk.
This is equivalent to
std::fd::File::sync_all
method, but wrapped in a trait so that it can be implemented for other types.