pub struct BlockStore { /* private fields */ }Expand description
File block storage backed by append-only store
Implementations§
Source§impl BlockStore
impl BlockStore
Sourcepub fn write_block(&self, data: &[u8]) -> Result<BlockRef>
pub fn write_block(&self, data: &[u8]) -> Result<BlockRef>
Write a block with automatic compression selection
Returns BlockRef for the written block.
Sourcepub fn write_block_with_compression(
&self,
data: &[u8],
compression: BlockCompression,
) -> Result<BlockRef>
pub fn write_block_with_compression( &self, data: &[u8], compression: BlockCompression, ) -> Result<BlockRef>
Write a block with specified compression
Sourcepub fn release_ref(&self, offset: u64) -> bool
pub fn release_ref(&self, offset: u64) -> bool
Decrement reference count
Sourcepub fn stats(&self) -> BlockStoreStats
pub fn stats(&self) -> BlockStoreStats
Get storage statistics
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for BlockStore
impl !RefUnwindSafe for BlockStore
impl Send for BlockStore
impl Sync for BlockStore
impl Unpin for BlockStore
impl UnwindSafe for BlockStore
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> 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