-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
A-tokioArea: The main tokio crateArea: The main tokio crateC-feature-requestCategory: A feature request.Category: A feature request.M-ioModule: tokio/ioModule: tokio/io
Description
Is your feature request related to a problem? Please describe.
It'd be helpful if there was a way to get the underlying buffer being used by a BufWriter instance. This could be helpful in scenarios where we want to do buffered writes while reusing the same buffer. The std library provides a way to do this using into_parts().
Describe the solution you'd like
Add a new method BufWriter:into_parts() which returns both the underlying stream and the buffer. This would return the buffer as is, i.e. any data thats sitting in the buffer is NOT flushed to the stream before the buffer is returned to the caller.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-tokioArea: The main tokio crateArea: The main tokio crateC-feature-requestCategory: A feature request.Category: A feature request.M-ioModule: tokio/ioModule: tokio/io