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

Make HeaderVec more Vec like #11

Open
cehteh opened this issue Sep 23, 2024 · 0 comments
Open

Make HeaderVec more Vec like #11

cehteh opened this issue Sep 23, 2024 · 0 comments

Comments

@cehteh
Copy link
Contributor

cehteh commented Sep 23, 2024

Whats your opinion about breaking changes that make HeaderVec more Vec like? With the long-time goal to be mostly a drop in replacement to std::Vec where it makes sense. Of course it needs to retain its unique API as it has now (access to the header, HeaderVecWeak, the atomic API I added)

notably change/additions:

  • Deref should result in &[T] not the header. provide a public .header() method to get the user header (the internal header() has to be renamed )
  • reserve all method names of std::Vec to be implemented opportunistically, there are a lot, many are somewhat uncommon and don't need to be implemented ASAP. .get() is most importantly missing, many others are also prolly only oneliners, like .iter() etc
  • add a "stdlib" feature, then methods that require std things can be conditionally included
  • implement (most of) the Traits that std::Vec implements for HeaderVec as well (possibly guarded by the stdlib feature)
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