-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add access methods #27
Comments
Really useful for the issue #19 where you don't have underlying vectors, so this gives a common interface for both versions and |
Sounds good to me! |
Also adding // vec: Vec<Example>
vec[0];
// soa: ExampleVec
soa.index(0); Should behave the same (even when it fails) and work with ranges :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: