MCPcopy Index your code
hub / github.com/RustPython/RustPython / __sizeof__

Method __sizeof__

crates/vm/src/builtins/bytearray.rs:214–216  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

212
213 #[pymethod]
214 fn __sizeof__(&self) -> usize {
215 size_of::<Self>() + self.borrow_buf().len() * size_of::<u8>()
216 }
217
218 #[pyslot]
219 fn slot_str(zelf: &PyObject, vm: &VirtualMachine) -> PyResult<PyStrRef> {

Callers

nothing calls this directly

Calls 2

lenMethod · 0.45
borrow_bufMethod · 0.45

Tested by

no test coverage detected