When does LineWriter flush? #42468
Labels
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
P-medium
Medium priority
It seems unclear to me from its documentation when exactly
std::io::LineWriter
will flush.The documentation of the struct says that it flushes "whenever a
newline […] is detected", but the existence and documentation of the
constructor
with_capacity
suggests thatLineWriter
has an internalbuffer of some set capacity.
What happens if a line written to the
LineWriter
exceeds thecapacity of the internal buffer? Can
LineWriter
also flush beforea newline is detected?
The text was updated successfully, but these errors were encountered: