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

Method borrow_buf

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

Source from the content-addressed store, hash-verified

86 }
87
88 pub fn borrow_buf(&self) -> PyMappedRwLockReadGuard<'_, [u8]> {
89 PyRwLockReadGuard::map(self.inner.read(), |inner| &*inner.elements)
90 }
91
92 pub fn borrow_buf_mut(&self) -> PyMappedRwLockWriteGuard<'_, Vec<u8>> {
93 PyRwLockWriteGuard::map(self.inner.write(), |inner| &mut inner.elements)

Callers 15

_setitemMethod · 0.45
_getitemMethod · 0.45
irepeatMethod · 0.45
__len__Method · 0.45
__sizeof__Method · 0.45
__add__Method · 0.45
__iadd__Method · 0.45
endswithMethod · 0.45
startswithMethod · 0.45
copyMethod · 0.45
__reduce__Method · 0.45
bytearray.rsFile · 0.45

Calls 1

readMethod · 0.45

Tested by

no test coverage detected