Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
For now compiler warns try_insert is unstable feature and points me to this bug But let's image I have this mutable ref to relation owned already by HashMap - is it going to work? Or this will be again some ref lives not long enough error? What are my options then? Is Box gonna help me here? (I don't really understand it yet) Or I better will story just relation id in item out_relations vector rather then refs? And when needed I will take my relation from the hasmap?
Have you looked at its examples: https://github.com/Ogeon/palette/tree/master/palette/examples?
If..then..else had to be invented
As u/onomatopeiaddx said, it isn't possible since macros only have access to the token tree it is given. I don't see why a newtype wouldn't work tho. and to help with newtypes you may want to have a look at the delegate crate