3 ms·
The .system() method converts the function pointer to an actual System trait implementation. This is accomplished by implementing traits for functions that mat
by _cart 6y ago
The .system() method converts the function pointer to an actual System trait implementation.
This is accomplished by implementing traits for functions that match a specific signature. Ex: Fn(SystemParam), Fn(SystemParam, SystemParam), etc.
The .system() method uses the SystemParam type information to determine what resources are being accessed, which gets converted to logic that can pass the resource data in. It also uses the extracted type information to inform the system executor how to safely run each system in parallel.