pub struct SkdbDirAlloc {
pub path: PathBuf,
pub layers: Vec<PathBuf>,
pub cursor: u32,
}
Expand description
§Directory Allocator
Allocates within a directory that lives on the file-system with the layer order determined by the layer file names
Fields§
§path: PathBuf
the path of the directory database
layers: Vec<PathBuf>
the (sorted) paths of the layers in the database
cursor: u32
Implementations§
Trait Implementations§
Source§impl<'a> Allocator<'a> for SkdbDirAlloc
impl<'a> Allocator<'a> for SkdbDirAlloc
Source§fn load_layers(&self) -> Result<Vec<Layer<'a, Self::LayerStream>>, Error>
fn load_layers(&self) -> Result<Vec<Layer<'a, Self::LayerStream>>, Error>
Loads the layer files from the directory
Source§type LayerStream = File
type LayerStream = File
The type of data stream the layers read and write to
Auto Trait Implementations§
impl Freeze for SkdbDirAlloc
impl RefUnwindSafe for SkdbDirAlloc
impl Send for SkdbDirAlloc
impl Sync for SkdbDirAlloc
impl Unpin for SkdbDirAlloc
impl UnwindSafe for SkdbDirAlloc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more