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

Method into_pybuffer

crates/vm/src/protocol/buffer.rs:431–438  ·  view source on GitHub ↗
(self, readonly: bool)

Source from the content-addressed store, hash-verified

429
430impl PyRef<VecBuffer> {
431 pub fn into_pybuffer(self, readonly: bool) -> PyBuffer {
432 let len = self.data.lock().len();
433 PyBuffer::new(
434 self.into(),
435 BufferDescriptor::simple(len, readonly),
436 &VEC_BUFFER_METHODS,
437 )
438 }
439
440 pub fn into_pybuffer_with_descriptor(self, desc: BufferDescriptor) -> PyBuffer {
441 PyBuffer::new(self.into(), desc, &VEC_BUFFER_METHODS)

Callers 2

raw_writeMethod · 0.80
raw_readMethod · 0.80

Calls 4

newFunction · 0.85
simpleFunction · 0.85
lenMethod · 0.45
lockMethod · 0.45

Tested by

no test coverage detected