mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-29 00:00:11 +02:00
@@ -117,6 +117,7 @@ cfg_io_util! {
|
|||||||
///
|
///
|
||||||
/// // Writes some prefix of the byte string, not necessarily all of it.
|
/// // Writes some prefix of the byte string, not necessarily all of it.
|
||||||
/// file.write(b"some bytes").await?;
|
/// file.write(b"some bytes").await?;
|
||||||
|
/// file.flush().await?;
|
||||||
/// Ok(())
|
/// Ok(())
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
@@ -162,6 +163,7 @@ cfg_io_util! {
|
|||||||
/// ];
|
/// ];
|
||||||
///
|
///
|
||||||
/// file.write_vectored(&bufs).await?;
|
/// file.write_vectored(&bufs).await?;
|
||||||
|
/// file.flush().await?;
|
||||||
///
|
///
|
||||||
/// Ok(())
|
/// Ok(())
|
||||||
/// }
|
/// }
|
||||||
@@ -244,6 +246,7 @@ cfg_io_util! {
|
|||||||
/// // all of it.
|
/// // all of it.
|
||||||
/// file.write_buf(&mut buffer).await?;
|
/// file.write_buf(&mut buffer).await?;
|
||||||
/// }
|
/// }
|
||||||
|
/// file.flush().await?;
|
||||||
///
|
///
|
||||||
/// Ok(())
|
/// Ok(())
|
||||||
/// }
|
/// }
|
||||||
@@ -307,6 +310,7 @@ cfg_io_util! {
|
|||||||
/// let mut buffer = Cursor::new(b"data to write");
|
/// let mut buffer = Cursor::new(b"data to write");
|
||||||
///
|
///
|
||||||
/// file.write_all_buf(&mut buffer).await?;
|
/// file.write_all_buf(&mut buffer).await?;
|
||||||
|
/// file.flush().await?;
|
||||||
/// Ok(())
|
/// Ok(())
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
@@ -356,6 +360,7 @@ cfg_io_util! {
|
|||||||
/// let mut file = File::create("foo.txt").await?;
|
/// let mut file = File::create("foo.txt").await?;
|
||||||
///
|
///
|
||||||
/// file.write_all(b"some bytes").await?;
|
/// file.write_all(b"some bytes").await?;
|
||||||
|
/// file.flush().await?;
|
||||||
/// Ok(())
|
/// Ok(())
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|||||||
Reference in New Issue
Block a user