ipld-collections 0.3.0

multiblock ipld collections
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use ipld_collections::List;
use libipld::error::Result;
use libipld::mem::MemStore;
use libipld::store::DefaultParams;

#[async_std::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let store = MemStore::<DefaultParams>::default();
    let mut list = List::new(store, 64, 256).await?;
    // push: 1024xi128; n: 4; width: 256; size: 4096
    for i in 0..1024 {
        list.push(i as i64).await?;
    }
    Ok(())
}