tokio-rs / bytes

Utilities for working with bytes
MIT License
1.91k stars 288 forks source link

Is there any lib to implement Buf for File? #574

Closed leptonyu closed 2 years ago

Darksonn commented 2 years ago

A memory mapped file can be used with the Buf trait via the &[u8] type. I'm not aware of any other implementations. We will not add such an impl to bytes itself as this is a footgun for anyone who uses it from an async application.