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

Read-only support #10

Open
bovee opened this issue Jun 25, 2019 · 0 comments
Open

Read-only support #10

bovee opened this issue Jun 25, 2019 · 0 comments

Comments

@bovee
Copy link
Contributor

bovee commented Jun 25, 2019

We need some way to support opening a bit-vector in read-only fashion. We had a readonly parameter on MmapBitVec::open at one point, but this doesn't work any more because upstream memmap split their base struct into mutable and non-mutable variants without a common trait to unify them (and passing a file created with OpenOptions::new()...write(false)... to a MmapMut initializer doesn't work either).

There are a few possible ways to do this:

  • implement our own trait on MmapMut and Mmap and store a boxed version of either in the MmapBitVec struct (this may give a perf hit?)
  • create a separate MmapBitVecReadOnly struct that implements BitVector too and let downstream choose
  • fork memmap :/
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

No branches or pull requests

1 participant