pub struct SizeTargets {
pub count: u64,
pub size: u64,
}
Expand description
Size targets for a store. Gc of non-pinned blocks will start once one of the size targets is exceeded.
There are targets for both block count and block size. The reason for this is that a store that has a very large number of tiny blocks will become sluggish despite not having a large total size.
Size targets only apply to non-pinned blocks. Pinned blocks will never be gced even if exceeding one of the size targets.
Fields§
§count: u64
target number of blocks.
Up to this number, the store will retain everything even if not pinned. Once this number is exceeded, the store will run garbage collection of all unpinned blocks until the block criterion is met again.
To completely disable storing of non-pinned blocks, set this to 0. Even then, the store will never delete pinned blocks.
size: u64
target store size.
Up to this size, the store will retain everything even if not pinned. Once this size is exceeded, the store will run garbage collection of all unpinned blocks until the size criterion is met again.
The store will never delete pinned blocks.
Implementations§
Trait Implementations§
Source§impl Clone for SizeTargets
impl Clone for SizeTargets
Source§fn clone(&self) -> SizeTargets
fn clone(&self) -> SizeTargets
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SizeTargets
impl Debug for SizeTargets
Source§impl Default for SizeTargets
impl Default for SizeTargets
Source§fn default() -> SizeTargets
fn default() -> SizeTargets
impl Copy for SizeTargets
Auto Trait Implementations§
impl Freeze for SizeTargets
impl RefUnwindSafe for SizeTargets
impl Send for SizeTargets
impl Sync for SizeTargets
impl Unpin for SizeTargets
impl UnwindSafe for SizeTargets
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more