pub struct BlockShard { /* private fields */ }Expand description
Individual shard with its own storage and index
Implementations§
Source§impl BlockShard
impl BlockShard
Sourcepub fn write_block(
&self,
data: &[u8],
compression: BlockCompression,
) -> Result<BlockRef>
pub fn write_block( &self, data: &[u8], compression: BlockCompression, ) -> Result<BlockRef>
Write a block to this shard
Sourcepub fn release_ref(&self, offset: u64) -> bool
pub fn release_ref(&self, offset: u64) -> bool
Decrement reference count, returns true if block can be reclaimed
Sourcepub fn stats(&self) -> ShardStats
pub fn stats(&self) -> ShardStats
Get shard statistics
Auto Trait Implementations§
impl !Freeze for BlockShard
impl !RefUnwindSafe for BlockShard
impl Send for BlockShard
impl Sync for BlockShard
impl Unpin for BlockShard
impl UnwindSafe for BlockShard
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