I come from a Go background , and am trying to port an appliation from go to rust .I have never used rust before ,and I do find some of programing paradims to be a bit complicated ,but I am getting used to it. One of the most important features that go application had is the concept of a context. It is a top level struct which holds copies/pointers to anything that the application needs .
An example
And this is a very common design used in various go projects. I have been trying to find something similar being used in rust applications , but I cant seem to find that.
Is there a reason why this pattern is not used in rust , or have I just not found the right projects ?
Aucun commentaire:
Enregistrer un commentaire