Skip to main content

BlockSink

Type Alias BlockSink 

Source
pub type BlockSink<'a> = dyn FnMut(&[u8], &[u8]) -> Result<()> + 'a;
Expand description

Visitor sink for build_folder_dag.

Called once per emitted block as (cid_bytes, block_bytes). For dag-pb nodes block_bytes is the canonical pbnode encoding; for raw leaves it is the raw chunk. The root block is always emitted last.