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
@@ -15,7 +15,11 @@ use std::task::{Context, Poll};
pin_project! {
/// A [`Sink`] of frames encoded to an `AsyncWrite`.
///
/// For examples of how to use `FramedWrite` with a codec, see the
/// examples on the [`codec`] module.
///
/// [`Sink`]: futures_sink::Sink
/// [`codec`]: crate::codec
pub struct FramedWrite<T, E> {
#[pin]
inner: FramedImpl<T, E, WriteFrame>,