pub struct Config {
pub path: PathBuf,
pub target_file_size: usize,
pub file_compaction_percent: u8,
pub max_object_size: usize,
pub partition_function: fn(object_id: ObjectId, object_size: usize) -> u8,
pub min_compaction_files: usize,
}Fields
path: PathBufStorage files will be kept here.
target_file_size: usizeGarbage collection will try to keep storage files around this size or smaller.
file_compaction_percent: u8Remaining live percentage of a file before it’s considered rewritabe.
max_object_size: usizeThe ceiling on the largest allocation this system will ever attempt to perform in order to read an object off of disk.
partition_function: fn(object_id: ObjectId, object_size: usize) -> u8A partitioning function for objects based on object ID and object size. You may override this to cause objects to be written into separate files so that garbage collection may take advantage of locality effects for your workload that are correlated to object identifiers or the size of data.
Ideally, you will colocate objects that have similar expected lifespans. Doing so minimizes the costs of copying live data over time during storage file GC.
min_compaction_files: usizeThe minimum number of files within a generation to collect if below the live compaction percent.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more