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

Method try_resizable_opt

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

Source from the content-addressed store, hash-verified

744 type Resizable<'a> = PyRwLockWriteGuard<'a, PyBytesInner>;
745
746 fn try_resizable_opt(&self) -> Option<Self::Resizable<'_>> {
747 let w = self.inner.write();
748 (self.exports.load(Ordering::SeqCst) == 0).then_some(w)
749 }
750}
751
752impl AsMapping for PyByteArray {

Callers 1

_setitemMethod · 0.45

Calls 2

writeMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected