We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 017f6cb commit fe54f67Copy full SHA for fe54f67
arrow-buffer/src/buffer/immutable.rs
@@ -74,6 +74,12 @@ impl Buffer {
74
/// Returns the offset, in bytes, of `Self::ptr` to `Self::data`
75
///
76
/// self.ptr and self.data can be different after slicing or advancing the buffer.
77
+ ///
78
+ /// # Safety
79
80
+ /// This function is unsafe as it uses unsafe function `offset_from`. Under certain
81
+ /// conditions, this function can cause undefined behavior. See the documentation of
82
+ /// `offset_from` for more information.
83
pub unsafe fn ptr_offset(&self) -> usize {
84
self.ptr.offset_from(self.data.ptr().as_ptr()) as usize
85
}
0 commit comments