pub trait OpenableFile<F: ManagedFile>: Debug + Sized + Send + Sync {
    fn id(&self) -> Option<u64>;
fn replace_with<C: FnOnce(u64)>(
        self,
        replacement: F,
        manager: &F::Manager,
        publish_callback: C
    ) -> Result<Self, Error>;
fn close(self) -> Result<(), Error>; }
Expand description

A file that can have operations performed on it.

Required methods

Returns the id of the file assigned from the file manager.

Replaces the current file with the file located at path atomically.

Closes the file. This may not actually close the underlying file, depending on what other tasks have access to the underlying file as well.

Implementors