Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify intended use of library #5

Open
kamalmarhubi opened this issue Nov 5, 2017 · 1 comment
Open

Clarify intended use of library #5

kamalmarhubi opened this issue Nov 5, 2017 · 1 comment

Comments

@kamalmarhubi
Copy link

Is it a ring buffer in the sense of constantly-being-written-to-buffer-of-recent-things sense, or is it a buffer in the buffer-between-a-producer-and-consumer sense? Examples would be handy!

@tokenrove
Copy link
Owner

I'll demo a usecase with rustls, but it applies everywhere you want to consume messages from a stream, where you might have read more than a message or less than a message, but want to be able to hand a buffer to the library producing messages without allocating, or moving things around in your buffer. Note that you can't do this with VecDeque because it doesn't wrap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants