mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-22 00:00:11 +02:00
fs: add File::max_buf_size (#7594)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user