MCPcopy Create free account
hub / github.com/ciphermodelabs/ciphercore / serialize_hashmap

Function serialize_hashmap

ciphercore-base/src/graphs.rs:4333–4340  ·  view source on GitHub ↗
(map: HashMap<K, V>)

Source from the content-addressed store, hash-verified

4331}
4332
4333fn serialize_hashmap<K, V>(map: HashMap<K, V>) -> Vec<(K, V)>
4334where
4335 K: Ord + Copy,
4336{
4337 let mut vec: Vec<_> = map.into_iter().collect();
4338 vec.sort_by_key(|(k, _)| *k);
4339 vec
4340}
4341
4342/// Methods which aren't supposed to be imported in Python.
4343impl Context {

Callers 1

make_serializableMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected