(no complicated macros)?
                  
                  
                  say given a Vector with x y z elements
                  
                  
                  in cpp you could do vec[0], vec[1], vec[2], vec[a]
                  
                  
                  what's the equivalent in rust?
                  
                  
                
Are you talking about a struct or Vec?
 dankey
                          
                        
                      
                    
                    
                    
                    
                      Автор вопроса
                      
                      
                        
                          dankey
                          
                        
                      
                    
                    
                    
                    
                      Автор вопроса
                    
                    
                  sorry ye i mean a struct Vector3 i created
You can iterate over struct fields like this: https://stackoverflow.com/a/61980417 But if u meant that. (Idk if I got what u mean right)
Обсуждают сегодня