You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I basically need smoltcp's RingBuffer in a dedicated library, because I want to use it in a non-networking context. You currently cannot use it without adding a dependency to smoltcp and its network features.
One idea is to move it from smoltcp to a dedicated crate, and I have sent out an inquiry whether they would accept a PR in that direction.
Another idea is to use a similar data structure from another crate. I have looked at the Deque of heapless, but it requires a capacity type parameter. smoltcp's RingBuffer asks the user to provide a mutable slice. The same RingBuffer can therefore operate on buffers of arbitrary size. This is exactly what I need for my application.
Now I would be happy with any data structure that may be used like a ring buffer, as long as it operates on mutable slices. Be it another Deque-like struct that shares much of its API (what would be a good name for that?), or taking over the original "RingBuffer" with its API.
Before I come up with a PR: Which of these options would the heapless crate accept?