Trait FileSync

Source
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§