alamb commented on code in PR #6939:
URL: https://github.com/apache/arrow-rs/pull/6939#discussion_r1903108763


##########
arrow-buffer/src/buffer/immutable.rs:
##########
@@ -28,8 +28,43 @@ use crate::{bit_util, bytes::Bytes, native::ArrowNativeType};
 use super::ops::bitwise_unary_op_helper;
 use super::{MutableBuffer, ScalarBuffer};
 
-/// Buffer represents a contiguous memory region that can be shared with other 
buffers and across
-/// thread boundaries.
+/// A contiguous memory region that can be shared with other buffers and across
+/// thread boundaries that stores Arrow data.
+///
+/// `Buffer`s can be sliced and cloned without copying the underlying data and 
can
+/// be created from memory allocated by non-Rust sources such as C/C++.
+///
+/// # Example: Create a `Buffer` from a `Vec` (without copying)

Review Comment:
   The rest of this PR is driven by the examples: converting to/from 
`bytes::Bytes` and `Vec`. I think it will be easier to  do this operation now 
and not get hung up on `Bytes` vs `bytes::Bytes`
   
   They are basically an expansion of the nice example @kylebarron  added in 
https://github.com/apache/arrow-rs/pull/6920



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to