util: add examples for FramedRead and FramedWrite (#6310)

This commit is contained in:
M.Amin Rayej
2024-02-11 02:38:44 +03:30
committed by GitHub
parent e392c4ff1e
commit e25d661e08
3 changed files with 74 additions and 0 deletions
+4
View File
@@ -14,8 +14,12 @@ use std::task::{Context, Poll};
pin_project! {
/// A [`Stream`] of messages decoded from an [`AsyncRead`].
///
/// For examples of how to use `FramedRead` with a codec, see the
/// examples on the [`codec`] module.
///
/// [`Stream`]: futures_core::Stream
/// [`AsyncRead`]: tokio::io::AsyncRead
/// [`codec`]: crate::codec
pub struct FramedRead<T, D> {
#[pin]
inner: FramedImpl<T, D, ReadFrame>,