Closed
Description
I just came across the situation where it would be very useful to be able to split a Vec
into several owned chunks just like std::slice::Chunks
without an additional allocation. It seems to me like one would only have to update some pointers and lengths. split_off
(unfortunately) allocates, so it cannot really be used for performance-critical paths.
How are your thoughts on such an API? Is this even possible with most allocators?