I have a function that accepts a &[u8] and returns an iterator, but because the iterator struct needs to hold a reference to the &[u8] passed into the function, I'm receiving lifetime issues. How do I work with this?
Here's the code in question. The error is on line 2, it's saying context needs a lifetime, even though it's owned by QueryIterator. The suspect the issue is that the ByteStream type contains a reference to the passed in &[u8]. https://is.gd/ndLOjL