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

Method len

src/objects/tuple.rs:54–59  ·  view source on GitHub ↗
(&self, _py: Python)

Source from the content-addressed store, hash-verified

52 /// Gets the length of the tuple.
53 #[inline]
54 pub fn len(&self, _py: Python) -> usize {
55 unsafe {
56 // non-negative Py_ssize_t should always fit into Rust uint
57 ffi::PyTuple_GET_SIZE(self.0.as_ptr()) as usize
58 }
59 }
60
61 /// Gets the item at the specified index.
62 ///

Callers 2

newMethod · 0.45
as_sliceMethod · 0.45

Calls 2

PyTuple_GET_SIZEFunction · 0.50
as_ptrMethod · 0.45

Tested by

no test coverage detected