Crate defaultdict

Source
Expand description

This library exposes structs that mimicks the behaviour of the python defaultdict.

This behaviour does require that the type of the value does have the Default implemented.

Macros§

defaultbtreemap
A quick way to instantiate a BTreeMap.
defaulthashmap
A quick way to instantiate a HashMap.

Structs§

DefaultBTreeMap
This struct mimicks the behaviour of a python defaultdict. This means alongside the traitbounds that apply on the key and value that are inherited from the BTreeMap, it also requires the Default trait be implemented on the value type.
DefaultHashMap
This struct mimicks the behaviour of a python defaultdict. This means alongside the traitbounds that apply on the key and value that are inherited from the HashMap, it also requires the Default trait be implemented on the value type.