pub struct Config<T: Translator, C> {
pub translator: T,
pub partition: String,
pub compression: Option<u8>,
pub codec_config: C,
pub items_per_section: NonZeroU64,
pub write_buffer: NonZeroUsize,
pub replay_buffer: NonZeroUsize,
pub buffer_pool: PoolRef,
}Expand description
Configuration for Archive storage.
Fields§
§translator: TLogic to transform keys into their index representation.
Archive assumes that all internal keys are spread uniformly across the key space. If that is not the case, lookups may be O(n) instead of O(1).
partition: StringThe partition to use for the archive’s crate::journal storage.
compression: Option<u8>The compression level to use for the archive’s crate::journal storage.
codec_config: CThe commonware_codec::Codec configuration to use for the value stored in the archive.
items_per_section: NonZeroU64The number of items per section (the granularity of pruning).
write_buffer: NonZeroUsizeThe amount of bytes that can be buffered in a section before being written to a commonware_runtime::Blob.
replay_buffer: NonZeroUsizeThe buffer size to use when replaying a commonware_runtime::Blob.
buffer_pool: PoolRefThe buffer pool to use for the archive’s crate::journal storage.
Trait Implementations§
Auto Trait Implementations§
impl<T, C> Freeze for Config<T, C>
impl<T, C> !RefUnwindSafe for Config<T, C>
impl<T, C> Send for Config<T, C>
impl<T, C> Sync for Config<T, C>
impl<T, C> Unpin for Config<T, C>
impl<T, C> !UnwindSafe for Config<T, C>
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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