pub trait MetadataFileSystem:
Debug
+ Send
+ Sync
+ 'static {
// Required method
fn persist_atomic(&self, target: &Path, bytes: &[u8]) -> RuntimeResult<()>;
}Expand description
Filesystem abstraction used by the metadata actor.
Implementations must not publish partial target files. Production callers
should use LocalMetadataFileSystem; the abstraction also permits
deterministic fault injection without relying on a particular host
filesystem.
Required Methods§
Sourcefn persist_atomic(&self, target: &Path, bytes: &[u8]) -> RuntimeResult<()>
fn persist_atomic(&self, target: &Path, bytes: &[u8]) -> RuntimeResult<()>
Atomically persists one immutable snapshot.
§Errors
Returns a typed error that identifies the failed durability step and retains the original I/O source.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".