pub enum WriteCaching {
Cached,
WriteThrough,
}Expand description
Whether a write may rest in the system cache (DI-2.6). The contract’s own type, so an implementation needs nothing from the ring crate for it; dioring passes it through as the write’s flag. It does not change durability: a write-through write is still durable only when its epoch is sealed, because device-level write-through (FUA) is not relied on.
What the platform does with it depends on how the file was opened, and dioring passes the
platform’s answer through as the write’s outcome. Measured on 2026-10-07 through dioring’s
ring: a write-through write to a handle opened for cached I/O – including one opened with
FILE_FLAG_WRITE_THROUGH – completes as failed, with Win32 error 509 (“not supported on a
file opened for cached IO”); to a handle opened with FILE_FLAG_NO_BUFFERING as well, it
completes as a transfer.
Variants§
Cached
The write may be satisfied into the system cache.
WriteThrough
Ask the system not to leave the data in its cache.
Trait Implementations§
Source§impl Clone for WriteCaching
impl Clone for WriteCaching
Source§fn clone(&self) -> WriteCaching
fn clone(&self) -> WriteCaching
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more