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

Add a BitVecView<'a> that references the BitVec with offset / len #46

Open
kamalmarhubi opened this issue Apr 19, 2017 · 4 comments
Open
Labels
Important high value feature or optimization
Milestone

Comments

@kamalmarhubi
Copy link

This is related to #13, but I think it can be implemented before IndexGet by adding

impl BitVec {
    fn slice<'a, R: RangeArgument>(&self, offset: usize, len: usize) -> BitVecView<'a> { ... }
}

Thoughts?

@Gankra
Copy link
Contributor

Gankra commented May 1, 2017

RangeArgument is still unstable afaik, so it would have to be behind the nightly flag.

Otherwise it seems fine; I'd call it BitSlice.

@pczarn
Copy link
Contributor

pczarn commented May 31, 2024

The mutable view &mut BitSlice could help with issue #43

The problem is, we do not have stable CoerceUnsized, Unsize or any solid DSTs story in Rust as of today so that we cannot yet implement this cleanly.

@pczarn
Copy link
Contributor

pczarn commented Jun 1, 2024

I would prefer to implement this as &'a BitSlice and &'a mut BitSlice

@pczarn pczarn added the Important high value feature or optimization label Jul 1, 2024
@pczarn
Copy link
Contributor

pczarn commented Jul 1, 2024

Similar to #29

@pczarn pczarn added this to the version 1.0 milestone Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Important high value feature or optimization
Projects
None yet
Development

No branches or pull requests

3 participants