Trait base::FileSync

source ·
pub trait FileSync {
    // Required methods
    fn fsync(&mut self) -> Result<()>;
    fn fdatasync(&mut 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(&mut self) -> Result<()>

source

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

Implementations on Foreign Types§

source§

impl FileSync for File

source§

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

source§

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

Implementors§