io: document cancel safety of AsyncBufReadExt::fill_buf (#6431)

This commit is contained in:
M.Amin Rayej
2024-03-26 20:45:15 +03:30
committed by GitHub
parent 4601c84718
commit e542501439
+6
View File
@@ -267,6 +267,12 @@ cfg_io_util! {
/// This function will return an I/O error if the underlying reader was
/// read, but returned an error.
///
/// # Cancel safety
///
/// This method is cancel safe. If you use it as the event in a
/// [`tokio::select!`](crate::select) statement and some other branch
/// completes first, then it is guaranteed that no data was read.
///
/// [`consume`]: crate::io::AsyncBufReadExt::consume
fn fill_buf(&mut self) -> FillBuf<'_, Self>
where