diff --git a/arrow-buffer/src/buffer/immutable.rs b/arrow-buffer/src/buffer/immutable.rs index d0c8ffa39783..cf1d6f366751 100644 --- a/arrow-buffer/src/buffer/immutable.rs +++ b/arrow-buffer/src/buffer/immutable.rs @@ -60,6 +60,14 @@ unsafe impl Sync for Buffer where Bytes: Sync {} impl Buffer { /// Auxiliary method to create a new Buffer + /// + /// This can be used with a [`bytes::Bytes`] via `into()`: + /// + /// ``` + /// # use arrow_buffer::Buffer; + /// let bytes = bytes::Bytes::from_static(b"foo"); + /// let buffer = Buffer::from_bytes(bytes.into()); + /// ``` #[inline] pub fn from_bytes(bytes: Bytes) -> Self { let length = bytes.len();