util: makes Framed and FramedStream resumable after eof (#3272)

This commit is contained in:
somethingelseentirely
2021-03-22 09:09:01 +01:00
committed by GitHub
parent 63395f061e
commit 8ed825fd49
4 changed files with 114 additions and 12 deletions
+5
View File
@@ -52,6 +52,11 @@ where
/// calling [`split`] on the `Framed` returned by this method, which will
/// break them into separate objects, allowing them to interact more easily.
///
/// Note that, for some byte sources, the stream can be resumed after an EOF
/// by reading from it, even after it has returned `None`. Repeated attempts
/// to do so, without new data available, continue to return `None` without
/// creating more (closing) frames.
///
/// [`Stream`]: futures_core::Stream
/// [`Sink`]: futures_sink::Sink
/// [`Decode`]: crate::codec::Decoder