collect_stable_vec_from

Function collect_stable_vec_from 

Source
pub fn collect_stable_vec_from<K, V, M>(map: &BTreeMap<K, V, M>) -> Vec<(K, V)>
where K: Storable + Clone + Ord, V: Storable + Clone, M: Memory,
Expand description

Collects entries from a BTreeMap into a Vec<(K, V)>.

This is a convenience wrapper over collect_stable_vec that calls .iter() for you.

§Type Parameters

  • K: Key type (must be Storable, Clone, and Ord)
  • V: Value type (must be Storable and Clone)
  • M: Stable memory backend

§Example

let vec = collect_stable_vec_from(&my_stable_map);