rust-cv / header-vec

Allows one to store a header struct and a vector all inline in the same memory on the heap and share weak versions for minimizing random lookups in data structures
MIT License
5 stars 2 forks source link

How do I get at the Header? #1

Closed makoConstruct closed 3 years ago

makoConstruct commented 3 years ago

Once I have let v = HeaderVec::new(h), how do I get get a reference to h from v?

vadixidav commented 3 years ago

The HeaderVec implements Deref. This means that you can call methods that h contains directly on the HeaderVec, and you can also access its members directly.