I am trying to create a programming construct.
the construct serially does run. (it throws some warnings that can be ignored)
This is how it looks like: Rust Playground
Where essentially I instantiate and populate a struct like this:
let mut mystruct = MyStruct::in1().await;
and then modify it like this:
In my actual program I perform multiple instantiations on different structs (!).
The work in the instantiation and modification requires more work to be performed, which includes network lookups, so I want each one of instantiations to be performed in their own thread in parallel.
This looks to me like something that I am not the first to think about, but I cannot make it work with tokio::spawn...
Importantant is that the struct is never used with more than one thread at a time, each thread