generalised maps for the rust language