pub struct EngramBuilder { /* private fields */ }Expand description
Builds an crate::Engram instance.
Implementations§
Source§impl EngramBuilder
impl EngramBuilder
Sourcepub fn memory_capacity(self, bytes: u64) -> Self
pub fn memory_capacity(self, bytes: u64) -> Self
Sets the approximate maximum L1 capacity in weighted bytes.
Sourcepub fn compression(self, compression: Compression) -> Self
pub fn compression(self, compression: Compression) -> Self
Selects compression for newly persisted values.
Sourcepub fn compression_threshold(self, bytes: usize) -> Self
pub fn compression_threshold(self, bytes: usize) -> Self
Compresses only values at least this large. The default is 1 KiB.
Sourcepub fn compress_only_if_smaller(self, enabled: bool) -> Self
pub fn compress_only_if_smaller(self, enabled: bool) -> Self
When enabled (the default), stores raw bytes when Zstd does not shrink them.
Sourcepub fn sqlite_connections(self, connections: u32) -> Self
pub fn sqlite_connections(self, connections: u32) -> Self
Sets the maximum number of SQLite connections used by this cache.
Sourcepub fn sqlite_synchronous(self, synchronous: SqliteSynchronous) -> Self
pub fn sqlite_synchronous(self, synchronous: SqliteSynchronous) -> Self
Selects SQLite’s WAL durability setting. SqliteSynchronous::Full is the default.
Sourcepub fn cleanup_interval(self, interval: Duration) -> Self
pub fn cleanup_interval(self, interval: Duration) -> Self
Enables periodic deletion of expired L2 rows. Disabled by default.
Trait Implementations§
Source§impl Clone for EngramBuilder
impl Clone for EngramBuilder
Auto Trait Implementations§
impl Forget for EngramBuilder
impl Freeze for EngramBuilder
impl RefUnwindSafe for EngramBuilder
impl Send for EngramBuilder
impl Sync for EngramBuilder
impl Unpin for EngramBuilder
impl UnsafeUnpin for EngramBuilder
impl UnwindSafe for EngramBuilder
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
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> ⓘ
Converts
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> ⓘ
Converts
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