pub trait SpillIo: Send + Sync {
// Required methods
fn create(&self) -> Result<(u64, Box<dyn Write + Send>)>;
fn open(&self, id: u64) -> Result<Box<dyn Read + Send>>;
fn remove(&self, id: u64) -> Result<()>;
fn record_usage(&self, id: u64);
}Required Methods§
Sourcefn create(&self) -> Result<(u64, Box<dyn Write + Send>)>
fn create(&self) -> Result<(u64, Box<dyn Write + Send>)>
2026-09-25: A fresh swap file: its id and a writer the device state streams into.
Sourcefn open(&self, id: u64) -> Result<Box<dyn Read + Send>>
fn open(&self, id: u64) -> Result<Box<dyn Read + Send>>
2026-09-25: The reader for swap file id.
fn remove(&self, id: u64) -> Result<()>
Sourcefn record_usage(&self, id: u64)
fn record_usage(&self, id: u64)
2026-09-25: Account the finished write of id against the swap budget.