Skip to main content

Module collections

Module collections 

Source
Expand description

Collection conversions (HashMap, BTreeMap, HashSet, BTreeSet).

Named R lists convert to HashMap<String, V> / BTreeMap<String, V>. Unnamed R vectors convert to HashSet<T> / BTreeSet<T> for native types. Nested lists convert to Vec<HashMap<String, V>> etc.

Macrosยง

impl_boxed_slice_try_from_sexp_native ๐Ÿ”’
impl_map_try_from_sexp ๐Ÿ”’
impl_set_try_from_sexp_native ๐Ÿ”’
impl_vec_map_try_from_sexp ๐Ÿ”’
impl_vec_try_from_sexp_native ๐Ÿ”’

Functionsยง

list_to_vec_of_maps ๐Ÿ”’
Helper to convert R list (VECSXP) to Vec<M> where each element is converted via M: TryFromSexp.
named_list_to_map ๐Ÿ”’
Helper to convert R named list to a map type.