#[non_exhaustive]pub struct DiskStoreOptions {
pub max_size: u64,
pub write: bool,
pub evict_others: bool,
}Expand description
How a DiskStore behaves.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_size: u64The most bytes the whole location may hold after a write.
write: boolWhether DiskStore::finish_run writes; a read-only store still serves the entries a run puts, until the
run ends.
evict_others: boolWhether a write that leaves the location over its cap drops the stores of other bases. A host turns it off when the cap comes from a file of the project, so a checked-in cap only ever shrinks the project’s own store.
Implementations§
Source§impl DiskStoreOptions
impl DiskStoreOptions
Sourcepub const fn with_max_size(self, max_size: u64) -> Self
pub const fn with_max_size(self, max_size: u64) -> Self
Caps the location at max_size bytes.
Sourcepub const fn with_write(self, write: bool) -> Self
pub const fn with_write(self, write: bool) -> Self
Whether DiskStore::finish_run writes.
Sourcepub const fn with_evict_others(self, evict_others: bool) -> Self
pub const fn with_evict_others(self, evict_others: bool) -> Self
Whether a write that leaves the location over its cap drops the stores of other bases.
Trait Implementations§
Source§impl Clone for DiskStoreOptions
impl Clone for DiskStoreOptions
impl Copy for DiskStoreOptions
Source§impl Debug for DiskStoreOptions
impl Debug for DiskStoreOptions
Source§impl Default for DiskStoreOptions
impl Default for DiskStoreOptions
impl Eq for DiskStoreOptions
Source§impl PartialEq for DiskStoreOptions
impl PartialEq for DiskStoreOptions
impl StructuralPartialEq for DiskStoreOptions
Auto Trait Implementations§
impl Forget for DiskStoreOptions
impl Freeze for DiskStoreOptions
impl Move for DiskStoreOptions
impl RefUnwindSafe for DiskStoreOptions
impl Send for DiskStoreOptions
impl Sync for DiskStoreOptions
impl Unpin for DiskStoreOptions
impl UnsafeUnpin for DiskStoreOptions
impl UnwindSafe for DiskStoreOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.