MCPcopy Create free account
hub / github.com/apache/arrow-rs / from

Method from

arrow-buffer/src/bytes.rs:235–244  ·  view source on GitHub ↗
(value: bytes::Bytes)

Source from the content-addressed store, hash-verified

233
234impl From<bytes::Bytes> for Bytes {
235 fn from(value: bytes::Bytes) -> Self {
236 let len = value.len();
237 Self {
238 len,
239 ptr: NonNull::new(value.as_ptr() as _).unwrap(),
240 deallocation: Deallocation::Custom(std::sync::Arc::new(value), len),
241 #[cfg(feature = "pool")]
242 reservation: Mutex::new(None),
243 }
244 }
245}
246
247#[cfg(test)]

Callers

nothing calls this directly

Calls 2

lenMethod · 0.45
as_ptrMethod · 0.45

Tested by

no test coverage detected