Skip to content
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

trait MultiSlice is undocumented #895

Closed
dovahcrow opened this issue Jan 16, 2021 · 2 comments · Fixed by #570
Closed

trait MultiSlice is undocumented #895

dovahcrow opened this issue Jan 16, 2021 · 2 comments · Fixed by #570

Comments

@dovahcrow
Copy link

dovahcrow commented Jan 16, 2021

It seems like we forget to pub use the MultiSlice?

See: https://docs.rs/ndarray/0.14.0/ndarray/index.html?search=multislice

@jturner314
Copy link
Member

I did this intentionally while implementing #717 because I didn't really want to expose the MultiSlice trait itself as part of the public API. Part of the reason I'm hesitant to expose it right now is that the trait should be improved once Rust has generic associated types. (The 'a and A should be moved to the Output associated type.)

Is there a particular reason to expose it other than for documentation purposes? If not, could we improve the documentation in other ways?

@dovahcrow
Copy link
Author

@jturner314 Thanks for the reply! Yes, I agree that we can expose this trait once we have the GAT.

Basically, I was trying to get a bunch of mutually disjointed mutable array views using multi_slice_mut. The problem I met was that what I got is a vector of ranges however the example in the documentation takes a tuple. I was trying to figure out what other types also implemented MultiSlice. However, the trait MultiSlice is unclickable due to being undocumented.

I'm totally fine with hiding MultiSlice until GAT landed since I can also read the source code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants