pub enum BlobMetaChunkArray {
V1(Vec<BlobChunkInfoV1Ondisk>),
V2(Vec<BlobChunkInfoV2Ondisk>),
}Expand description
A customized array to host chunk information table for a blob.
Variants§
V1(Vec<BlobChunkInfoV1Ondisk>)
V1 chunk compression information array.
V2(Vec<BlobChunkInfoV2Ondisk>)
V2 chunk compression information array.
Implementations§
Source§impl BlobMetaChunkArray
impl BlobMetaChunkArray
Sourcepub fn new_v1() -> Self
pub fn new_v1() -> Self
Create a BlobMetaChunkArray with v1 chunk compression information format.
Sourcepub fn new_v2() -> Self
pub fn new_v2() -> Self
Create a BlobMetaChunkArray with v2 chunk compression information format.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Check whether the chunk compression information array is empty or not.
Sourcepub fn as_byte_slice(&self) -> &[u8] ⓘ
pub fn as_byte_slice(&self) -> &[u8] ⓘ
Convert the chunk compression information array as a u8 slice.
Sourcepub fn add_v1(
&mut self,
compressed_offset: u64,
compressed_size: u32,
uncompressed_offset: u64,
uncompressed_size: u32,
)
pub fn add_v1( &mut self, compressed_offset: u64, compressed_size: u32, uncompressed_offset: u64, uncompressed_size: u32, )
Add an entry of v1 chunk compression information into the array.
Sourcepub fn add_v2(
&mut self,
compressed_offset: u64,
compressed_size: u32,
uncompressed_offset: u64,
uncompressed_size: u32,
compressed: bool,
encrypted: bool,
has_crc32: bool,
is_batch: bool,
data: u64,
)
pub fn add_v2( &mut self, compressed_offset: u64, compressed_size: u32, uncompressed_offset: u64, uncompressed_size: u32, compressed: bool, encrypted: bool, has_crc32: bool, is_batch: bool, data: u64, )
Add an entry of v2 chunk compression information into the array.
Sourcepub fn add_v2_info(&mut self, chunk_info: BlobChunkInfoV2Ondisk)
pub fn add_v2_info(&mut self, chunk_info: BlobChunkInfoV2Ondisk)
Add an entry of pre-built v2 chunk compression information into the array.
Trait Implementations§
Source§impl Clone for BlobMetaChunkArray
impl Clone for BlobMetaChunkArray
Source§fn clone(&self) -> BlobMetaChunkArray
fn clone(&self) -> BlobMetaChunkArray
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BlobMetaChunkArray
impl RefUnwindSafe for BlobMetaChunkArray
impl Send for BlobMetaChunkArray
impl Sync for BlobMetaChunkArray
impl Unpin for BlobMetaChunkArray
impl UnsafeUnpin for BlobMetaChunkArray
impl UnwindSafe for BlobMetaChunkArray
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