You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now it's not possible implement the trait Index and IndexMut. This issue would add a way to access the elements in a way that also works for Vec. This would also make accessing the underlying Vec not required.
// Beforelet value = vec.field[1];// Afterlet value = vec.get(1)?.field;// vec could be an ExampleVec or a Vec<Example>
And we might get a reference (which we couldn't do before):
let reference = vec.get(2)?;
Also would support ranges:
let slice = vec.get(0..5)?;
And we should probably add ranges to our custom slice so it's possible to get an smaller slice from a slice.
To do so, it would make sense to make a trait similar to SliceIndex but changing the output to not require returning a reference (so we can use our struct of references).
The text was updated successfully, but these errors were encountered:
Add the methods
get
,get_mut
,get_unchecked
, andget_unchecked_mut
ofVec
to the generated SoA.Right now it's not possible implement the trait
Index
andIndexMut
. This issue would add a way to access the elements in a way that also works forVec
. This would also make accessing the underlyingVec
not required.And we might get a reference (which we couldn't do before):
Also would support ranges:
And we should probably add ranges to our custom slice so it's possible to get an smaller slice from a slice.
To do so, it would make sense to make a trait similar to SliceIndex but changing the output to not require returning a reference (so we can use our struct of references).
The text was updated successfully, but these errors were encountered: