fs: add File::max_buf_size (#7594)

This commit is contained in:
Martin Grigorov
2025-09-09 08:12:07 +00:00
committed by GitHub
parent ac4c95972e
commit 03bb6e29b1
+5
View File
@@ -579,6 +579,11 @@ impl File {
pub fn set_max_buf_size(&mut self, max_buf_size: usize) {
self.max_buf_size = max_buf_size;
}
/// Get the maximum buffer size for the underlying [`AsyncRead`] / [`AsyncWrite`] operation.
pub fn max_buf_size(&self) -> usize {
self.max_buf_size
}
}
impl AsyncRead for File {