Closed PudgeKim closed 3 months ago
Views are temporary borrow of storages. Storages are where components are stored. So they are mutually exclusive.
View/ViewMut
are SparseSet
's views. In theory they could be called SparseSetView
/SparseSetViewMut
but that would be a long name.
You could have instead View/ViewMut
for dyn Storage
, it would simplify a bunch of code. But execution speed would take a hit.
AllStorages
struct handles all storages.Storage
is trait so I thinkView
orViewMut
should implementsStorage
trait.But
SparseSet
implementsStorage
which is inView
/ViewMut
. I thinkView
orViewMut
should have aStorage
trait field instead ofSparseSet
.impl<T: 'static + Component + Send + Sync> Storage for SparseSet<T>
hmm.. I don't understand what this code means. Please explain why..! And would you explain me about some connection between important traits(or structs) (Component, View/ViewMut, ...)? (It would help me looking code..!)