pub struct ExtensibleArrayDataBlock {
pub class_id: u8,
pub header_addr: u64,
pub block_offset: u64,
pub elements: Vec<u64>,
}Expand description
Extensible array data block.
On-disk layout:
"EADB"(4) + version=0(1) + class_id(1)
+ header_addr(sizeof_addr)
+ block_offset (variable length)
+ elements(nelmts * raw_elmt_size)
+ checksum(4)Fields§
§class_id: u8§header_addr: u64§block_offset: u64§elements: Vec<u64>Chunk addresses.
Implementations§
Source§impl ExtensibleArrayDataBlock
impl ExtensibleArrayDataBlock
Sourcepub fn new(header_addr: u64, block_offset: u64, nelmts: usize) -> Self
pub fn new(header_addr: u64, block_offset: u64, nelmts: usize) -> Self
Create a new empty data block.
Sourcepub fn block_offset_size(max_nelmts_bits: u8) -> usize
pub fn block_offset_size(max_nelmts_bits: u8) -> usize
Number of bytes needed for the block_offset field.
Sourcepub fn encoded_size(&self, ctx: &FormatContext, max_nelmts_bits: u8) -> usize
pub fn encoded_size(&self, ctx: &FormatContext, max_nelmts_bits: u8) -> usize
Compute the encoded size.
pub fn encode(&self, ctx: &FormatContext, max_nelmts_bits: u8) -> Vec<u8> ⓘ
pub fn decode( buf: &[u8], ctx: &FormatContext, max_nelmts_bits: u8, nelmts: usize, ) -> FormatResult<Self>
Trait Implementations§
Source§impl Clone for ExtensibleArrayDataBlock
impl Clone for ExtensibleArrayDataBlock
Source§fn clone(&self) -> ExtensibleArrayDataBlock
fn clone(&self) -> ExtensibleArrayDataBlock
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 moreSource§impl Debug for ExtensibleArrayDataBlock
impl Debug for ExtensibleArrayDataBlock
Source§impl PartialEq for ExtensibleArrayDataBlock
impl PartialEq for ExtensibleArrayDataBlock
impl StructuralPartialEq for ExtensibleArrayDataBlock
Auto Trait Implementations§
impl Freeze for ExtensibleArrayDataBlock
impl RefUnwindSafe for ExtensibleArrayDataBlock
impl Send for ExtensibleArrayDataBlock
impl Sync for ExtensibleArrayDataBlock
impl Unpin for ExtensibleArrayDataBlock
impl UnsafeUnpin for ExtensibleArrayDataBlock
impl UnwindSafe for ExtensibleArrayDataBlock
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