pub struct PersistentLayerWriter<W: WriteBytes, K: Key, V: LayerValue> { /* private fields */ }
Implementations§
Source§impl<W: WriteBytes, K: Key, V: LayerValue> PersistentLayerWriter<W, K, V>
impl<W: WriteBytes, K: Key, V: LayerValue> PersistentLayerWriter<W, K, V>
Sourcepub async fn new(
writer: W,
estimated_num_items: usize,
block_size: u64,
) -> Result<Self, Error>
pub async fn new( writer: W, estimated_num_items: usize, block_size: u64, ) -> Result<Self, Error>
Creates a new writer that will serialize items to the object accessible via |object_handle|
(which provides a write interface to the object).
estimated_num_items
is an estimate for the number of items that we expect to write into
the layer. This need not be exact; it is used for estimating the size of bloom filter to
create. In general this is likely to be an over-count, as during compaction items might be
merged. That results in bloom filters that are slightly bigger than necessary, which isn’t
a significant problem.
Trait Implementations§
Source§impl<W: WriteBytes, K: Key, V: LayerValue> Drop for PersistentLayerWriter<W, K, V>
impl<W: WriteBytes, K: Key, V: LayerValue> Drop for PersistentLayerWriter<W, K, V>
Source§impl<W: WriteBytes + Send, K: Key, V: LayerValue> LayerWriter<K, V> for PersistentLayerWriter<W, K, V>
impl<W: WriteBytes + Send, K: Key, V: LayerValue> LayerWriter<K, V> for PersistentLayerWriter<W, K, V>
Auto Trait Implementations§
impl<W, K, V> Freeze for PersistentLayerWriter<W, K, V>where
W: Freeze,
impl<W, K, V> RefUnwindSafe for PersistentLayerWriter<W, K, V>
impl<W, K, V> Send for PersistentLayerWriter<W, K, V>where
W: Send,
impl<W, K, V> Sync for PersistentLayerWriter<W, K, V>where
W: Sync,
impl<W, K, V> Unpin for PersistentLayerWriter<W, K, V>where
W: Unpin,
impl<W, K, V> UnwindSafe for PersistentLayerWriter<W, K, V>
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, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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