Kimundi / owning-ref-rs

A library for creating references that carry their owner with them.
MIT License
359 stars 50 forks source link

How to `split`? #36

Open dpc opened 7 years ago

dpc commented 7 years ago

I have a ArcRef<Vec<u8>, [u8]>. I'd like to turn it into two ArcRef<Vec<u8>, [u8]>s, each a subslice (something like split does for strings etc.). I need something like a map, but that allows me to return two new ArcRefs.

HeroicKatora commented 4 years ago

This might be resolved now. ArcRef is Clone which allows one to duplicate the handle and then map the two instances independently into the sublisces.