pub fn with_capacity(capacity: usize, inner: R) -> Self {
        // TODO: consider using Box<[u8]>::new_uninit_slice once it stabilized
        let buffer = vec![0; capacity];
        Self { inner, buffer: buffer.into_boxed_slice(), pos: 0, cap: 0 }
    }
Creates a new `BufReader` with the specified buffer capacity.
futures-util/src/io/buf_reader.rs