Crate cloud_mmr

Source

Modules§

hash
Hash Function
macros
Generic macros used here and there to simplify and make code more readable.
merkle_proof
Merkle Proofs
pmmr
Persistent and prunable Merkle Mountain Range implementation. For a high level description of MMRs, see:
ser
Serialization and deserialization layer specialized for binary encoding. Ensures consistency and safety. Basically a minimal subset or rustc_serialize customized for our need.
storage
Storage of core types using RocksDB.

Macros§

filter_map_vec
Eliminates some of the verbosity in having iter and collect around every filter_map call.
map_vec
Eliminates some of the verbosity in having iter and collect around every map call.
ser_multiread
Eliminate some of the boilerplate of deserialization (package ser) by passing just the list of reader function (with optional single param) Example before: let foo = reader.read_u64()?; let bar = reader.read_u32()?; let fixed_byte_var = reader.read_fixed_bytes(64)?; Example after: let (foo, bar, fixed_byte_var) = ser_multiread!(reader, read_u64, read_u32, read_fixed_bytes(64));
ser_multiwrite
Eliminate some of the boilerplate of serialization (package ser) by passing directly pairs of writer function and data to write. Example before: reader.write_u64(42)?; reader.write_u32(100)?; Example after: ser_multiwrite!(writer, [write_u64, 42], [write_u32, 100]);
tee
Allows the conversion of an expression that doesn’t return anything to one that returns the provided identifier. Example: let foo = vec![1,2,3] println!(tee!(foo, foo.append(vec![3,4,5]))
try_iter_map_vec
Same as try_map_vec when thing is an iterator
try_map_vec
Same as map_vec when the map closure returns Results. Makes sure the results are “pushed up” and wraps with a try.