pub trait FileCommitter:
Send
+ Sync
+ Debug
+ FileRw {
// Required method
fn commit(&self) -> Result<(), StorageError>;
}Expand description
Allows a file to be committed to stable storage.
This is a supertrait of FileReader that only allows the commit operation.
It’s somewhat surprising that a file that can’t be written can be committed,
but it makes sense in the context of FileWriter::complete returning a
FileReader that isn’t necessarily committed yet. Making this a separate
trait allows code to split off a FileCommitter to hand to a piece of code
that only needs to be able to commit it.
Required Methods§
Sourcefn commit(&self) -> Result<(), StorageError>
fn commit(&self) -> Result<(), StorageError>
Commits the file to stable storage.