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

Method frombytes

crates/stdlib/src/array.rs:860–864  ·  view source on GitHub ↗
(&self, b: ArgBytesLike, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

858
859 #[pymethod]
860 fn frombytes(&self, b: ArgBytesLike, vm: &VirtualMachine) -> PyResult<()> {
861 let b = b.borrow_buf();
862 let itemsize = self.read().itemsize();
863 self._from_bytes(&b, itemsize, vm)
864 }
865
866 #[pymethod]
867 fn fromfile(&self, f: PyObjectRef, n: isize, vm: &VirtualMachine) -> PyResult<()> {

Callers 15

recv_fdsFunction · 0.80
closeRecvmsgFDsMethod · 0.80
checkRecvmsgFDsMethod · 0.80
checkTruncatedArrayMethod · 0.80
checkHopLimitMethod · 0.80
test_tofrombytesMethod · 0.80
test_frombytesMethod · 0.80
_to_memoryviewFunction · 0.80

Calls 4

_from_bytesMethod · 0.80
borrow_bufMethod · 0.45
itemsizeMethod · 0.45
readMethod · 0.45

Tested by 11

closeRecvmsgFDsMethod · 0.64
checkRecvmsgFDsMethod · 0.64
checkTruncatedArrayMethod · 0.64
checkHopLimitMethod · 0.64
test_tofrombytesMethod · 0.64
test_frombytesMethod · 0.64
_to_memoryviewFunction · 0.64