pub trait SnapshotSink {
// Required methods
fn write(&mut self, bytes: &[u8]) -> Result<(), Error>;
fn patch(&mut self, at: u64, bytes: &[u8]) -> Result<(), Error>;
}Expand description
A byte sink for streaming a snapshot without materializing the whole
image: write appends in file order, patch overwrites a
short run at an absolute offset — used once for the header file-hash
field, the only non-sequential write, done after the body has streamed.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".