You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For Bytes implementations which point to a reference counted shared storage (e.g. an Arc<[u8]>),
sharing will be implemented by increasing the reference count.
This lead me to assume that Bytes should provide a from conversion function from an Arc<[u8]> to a Bytes instance where the backing storage is an Arc. However, it doesn't appear that this from function exists.
I don't think it's a good idea for documentation to reference imaginary scenarios that aren't implemented by the library as it sets up false expectations with regard to how the library works and what features it provides.
The text was updated successfully, but these errors were encountered:
The latest documentation of the crate reads:
Reference: https://docs.rs/bytes/latest/bytes/struct.Bytes.html#sharing
This lead me to assume that Bytes should provide a
from
conversion function from anArc<[u8]>
to aBytes
instance where the backing storage is anArc
. However, it doesn't appear that thisfrom
function exists.I don't think it's a good idea for documentation to reference imaginary scenarios that aren't implemented by the library as it sets up false expectations with regard to how the library works and what features it provides.
The text was updated successfully, but these errors were encountered: