pub struct ExtensibleArrayIndexBlock {
pub class_id: u8,
pub header_addr: u64,
pub elements: Vec<u64>,
pub dblk_addrs: Vec<u64>,
pub sblk_addrs: Vec<u64>,
}Expand description
Extensible array index block.
On-disk layout:
"EAIB"(4) + version=0(1) + class_id(1)
+ header_addr(sizeof_addr)
+ elements (idx_blk_elmts * raw_elmt_size bytes)
+ data_block_addresses (ndblk_addrs * sizeof_addr)
+ super_block_addresses (nsblk_addrs * sizeof_addr)
+ checksum(4)Fields§
§class_id: u8§header_addr: u64§elements: Vec<u64>Direct chunk addresses in the index block.
dblk_addrs: Vec<u64>Data block addresses.
sblk_addrs: Vec<u64>Super block addresses.
Implementations§
Source§impl ExtensibleArrayIndexBlock
impl ExtensibleArrayIndexBlock
Sourcepub fn new(
header_addr: u64,
idx_blk_elmts: u8,
ndblk_addrs: usize,
nsblk_addrs: usize,
) -> Self
pub fn new( header_addr: u64, idx_blk_elmts: u8, ndblk_addrs: usize, nsblk_addrs: usize, ) -> Self
Create a new empty index block.
Sourcepub fn encoded_size(&self, ctx: &FormatContext) -> usize
pub fn encoded_size(&self, ctx: &FormatContext) -> usize
Compute the encoded size.
pub fn encode(&self, ctx: &FormatContext) -> Vec<u8> ⓘ
pub fn decode( buf: &[u8], ctx: &FormatContext, idx_blk_elmts: usize, ndblk_addrs: usize, nsblk_addrs: usize, ) -> FormatResult<Self>
Trait Implementations§
Source§impl Clone for ExtensibleArrayIndexBlock
impl Clone for ExtensibleArrayIndexBlock
Source§fn clone(&self) -> ExtensibleArrayIndexBlock
fn clone(&self) -> ExtensibleArrayIndexBlock
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 ExtensibleArrayIndexBlock
impl Debug for ExtensibleArrayIndexBlock
impl StructuralPartialEq for ExtensibleArrayIndexBlock
Auto Trait Implementations§
impl Freeze for ExtensibleArrayIndexBlock
impl RefUnwindSafe for ExtensibleArrayIndexBlock
impl Send for ExtensibleArrayIndexBlock
impl Sync for ExtensibleArrayIndexBlock
impl Unpin for ExtensibleArrayIndexBlock
impl UnsafeUnpin for ExtensibleArrayIndexBlock
impl UnwindSafe for ExtensibleArrayIndexBlock
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