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