MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / suboffsets

Method suboffsets

src/buffer.rs:264–275  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

262 /// If all suboffsets are negative (i.e. no de-referencing is needed), then this field must be NULL (the default value).
263 #[inline]
264 pub fn suboffsets(&self) -> Option<&[isize]> {
265 unsafe {
266 if self.0.suboffsets.is_null() {
267 None
268 } else {
269 Some(slice::from_raw_parts(
270 self.0.suboffsets,
271 self.0.ndim as usize,
272 ))
273 }
274 }
275 }
276
277 /// A NUL terminated string in struct module style syntax describing the contents of a single item.
278 #[inline]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected