pub trait FileSync {
    // Required methods
    fn fsync(&self) -> Result<()>;
    fn fdatasync(&self) -> Result<()>;
}
Expand description

A trait for flushing the contents of a file to disk. This is equivalent to File’s sync_all and sync_data methods, but wrapped in a trait so that it can be implemented for other types.

Required Methods§

source

fn fsync(&self) -> Result<()>

source

fn fdatasync(&self) -> Result<()>

Implementations on Foreign Types§

source§

impl FileSync for File

source§

fn fsync(&self) -> Result<()>

source§

fn fdatasync(&self) -> Result<()>

Implementors§