It would be great if the doc header included a note:
/// Creates a new `BytesMut`, which is initialized with zero.
///
/// **Note**: The length of the buffer will be set to `len`
It's easy to miss that the argument is len which corresponds to the actual len, was scratching my head a bunch until I added sanity checks to discover this.