Hello, thanks for the library!
I am trying to use it in my project and it's not clear to me how I should determine the size of the output buffer when reading from the database.
It would be nice if the ReadError::BufferTooSmall variant contained the actual min required size of the buffer, as it seems to be available once the key is found.
Perhaps the same thing could be done for CursorError::Key/ValueBufferTooSmall.
I just intend to resize the buffer with the returned size, but I think it would be even better if it was possible to pass in a &mut Vec<u8> rather than a &mut [u8] so that the resizing could occur right where the error would be returned from. Perhaps this could be feature-gated?
Would be interested in hearing your thoughts on this. Thanks!
Hello, thanks for the library!
I am trying to use it in my project and it's not clear to me how I should determine the size of the output buffer when reading from the database.
It would be nice if the
ReadError::BufferTooSmallvariant contained the actual min required size of the buffer, as it seems to be available once the key is found.Perhaps the same thing could be done for
CursorError::Key/ValueBufferTooSmall.I just intend to resize the buffer with the returned size, but I think it would be even better if it was possible to pass in a
&mut Vec<u8>rather than a&mut [u8]so that the resizing could occur right where the error would be returned from. Perhaps this could be feature-gated?Would be interested in hearing your thoughts on this. Thanks!