pub trait LsmTableNamespace {
type Device: PageDevice;
// Required methods
fn list(&mut self, max_entries: usize) -> Result<Vec<u64>, LinkError>;
fn create(&mut self, id: u64) -> Result<Self::Device, LinkError>;
fn open(&mut self, id: u64) -> Result<Self::Device, LinkError>;
fn close(&mut self, device: &mut Self::Device) -> Result<(), LinkError>;
fn delete(&mut self, id: u64) -> Result<(), LinkError>;
// Provided method
fn supports_durable_flush(&self) -> bool { ... }
}Expand description
Exclusive synchronous namespace. List returns every ordered numeric identity or fails within its bound. Create never reuses a name; open never creates missing files. Successful create/delete persist directory entries. Close aborts staged repair and permits retry after an uncertain result.
Required Associated Types§
type Device: PageDevice
Required Methods§
fn list(&mut self, max_entries: usize) -> Result<Vec<u64>, LinkError>
fn create(&mut self, id: u64) -> Result<Self::Device, LinkError>
fn open(&mut self, id: u64) -> Result<Self::Device, LinkError>
fn close(&mut self, device: &mut Self::Device) -> Result<(), LinkError>
fn delete(&mut self, id: u64) -> Result<(), LinkError>
Provided Methods§
fn supports_durable_flush(&self) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".