disk_layered

Trait WriteNoOverwrite

Source
pub trait WriteNoOverwrite: Send + Sync {
    // Required method
    fn write_no_overwrite(
        &self,
        buffers: &RequestBuffers<'_>,
        sector: u64,
    ) -> impl Future<Output = Result<(), DiskError>> + Send;
}
Expand description

Writes to the layer without overwriting existing data.

Required Methods§

Source

fn write_no_overwrite( &self, buffers: &RequestBuffers<'_>, sector: u64, ) -> impl Future<Output = Result<(), DiskError>> + Send

Write to the layer without overwriting existing data. Existing sectors must be preserved.

This is used to support read caching, where the data being written may be stale by the time it is written back to the layer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: WriteNoOverwrite> WriteNoOverwrite for &T

Source§

fn write_no_overwrite( &self, buffers: &RequestBuffers<'_>, sector: u64, ) -> impl Future<Output = Result<(), DiskError>> + Send

Implementors§