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

Method tobytes

crates/stdlib/src/array.rs:927–929  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

925
926 #[pymethod]
927 pub(crate) fn tobytes(&self) -> Vec<u8> {
928 self.read().get_bytes().to_vec()
929 }
930
931 #[pymethod]
932 fn tofile(&self, f: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {

Callers 15

_bytes_from_decode_dataFunction · 0.45
_b32encodeFunction · 0.45
_85encodeFunction · 0.45
save_picklebufferMethod · 0.45
_test_pack_intoMethod · 0.45
testRecvmsgIntoArrayMethod · 0.45
_testFDPassSimpleMethod · 0.45
_testFDPassPartialIntMethod · 0.45
_testOddCmsgSizeMethod · 0.45
testRecvIntoArrayMethod · 0.45

Calls 3

to_vecMethod · 0.80
get_bytesMethod · 0.45
readMethod · 0.45

Tested by 15

_test_pack_intoMethod · 0.36
testRecvmsgIntoArrayMethod · 0.36
_testFDPassSimpleMethod · 0.36
_testFDPassPartialIntMethod · 0.36
_testOddCmsgSizeMethod · 0.36
testRecvIntoArrayMethod · 0.36
testRecvFromIntoArrayMethod · 0.36
check_memoryviewMethod · 0.36
test_readintoMethod · 0.36
test_tofrombytesMethod · 0.36