vmm_sys_util::file_traits

Trait FileSync

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

Required Methods§

Source

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

Flush buffers related to this file to disk.

Implementations on Foreign Types§

Source§

impl FileSync for File

Source§

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

Implementors§