Config

Struct Config 

Source
pub struct Config<BC: BlobCache, C: Compressor + Clone> { /* private fields */ }
Expand description

Value log configuration

Implementations§

Source§

impl<BC: BlobCache, C: Compressor + Clone + Default> Config<BC, C>

Source

pub fn new(blob_cache: BC) -> Self

Creates a new configuration builder.

Source

pub fn compression(self, compressor: Option<C>) -> Self

Sets the compression & decompression scheme.

Source

pub fn blob_cache(self, blob_cache: BC) -> Self

Sets the blob cache.

You can create a global BlobCache and share it between multiple value logs to cap global cache memory usage.

Source

pub fn segment_size_bytes(self, bytes: u64) -> Self

Sets the maximum size of value log segments.

This heavily influences space amplification, as space reclamation works on a per-segment basis.

Like blob_file_size in RocksDB.

Default = 256 MiB

Auto Trait Implementations§

§

impl<BC, C> Freeze for Config<BC, C>
where BC: Freeze, C: Freeze,

§

impl<BC, C> RefUnwindSafe for Config<BC, C>

§

impl<BC, C> Send for Config<BC, C>
where BC: Send, C: Send,

§

impl<BC, C> Sync for Config<BC, C>
where BC: Sync, C: Sync,

§

impl<BC, C> Unpin for Config<BC, C>
where BC: Unpin, C: Unpin,

§

impl<BC, C> UnwindSafe for Config<BC, C>
where BC: UnwindSafe, C: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.