demux_map

Function demux_map 

Source
pub fn demux_map<Key, Si, Item>(
    sinks: impl Into<HashMap<Key, Si>>,
) -> DemuxMap<Key, Si>
where Key: Eq + Hash + Debug + Unpin, Si: Sink<Item> + Unpin,
Available on crate feature std only.
Expand description

Creates a DemuxMap sink that sends each item to one of many outputs, depending on the key.

This requires sinks Si to be Unpin. If your sinks are not Unpin, first wrap them in Box::pin to make them Unpin.