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

Add BufferOne sink combinator #414

Closed
wants to merge 1 commit into from
Closed

Add BufferOne sink combinator #414

wants to merge 1 commit into from

Conversation

carllerche
Copy link
Member

@carllerche carllerche commented Mar 14, 2017

The decorator can buffer a single value without requiring any internal allocations. The type also provides poll_ready. I left out a Sink::buffer_one for this one in favor of BufferOne::new.

Relates to #409

@alexcrichton
Copy link
Member

I wonder if we could perhaps push on the buffered type first before this? I think the semantics of poll_ready are implementable over there, right? We may also be able to special case w/ a "small vec" sort of

@carllerche
Copy link
Member Author

Buffered could possibly be updated to handle this case. I agree it is worth a look.

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

Successfully merging this pull request may close these issues.

2 participants