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

Method readinto

crates/vm/src/stdlib/_io.rs:1909–1914  ·  view source on GitHub ↗
(&self, buf: ArgMemoryBuffer, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1907
1908 #[pymethod]
1909 fn readinto(&self, buf: ArgMemoryBuffer, vm: &VirtualMachine) -> PyResult<Option<usize>> {
1910 let mut data = self.reader().lock(vm)?;
1911 let raw = data.check_init(vm)?;
1912 ensure_unclosed(raw, "readinto of closed file", vm)?;
1913 data.readinto_generic(buf.into(), false, vm)
1914 }
1915
1916 #[pymethod]
1917 fn readinto1(&self, buf: ArgMemoryBuffer, vm: &VirtualMachine) -> PyResult<Option<usize>> {

Callers

nothing calls this directly

Implementers 1

_io.rscrates/vm/src/stdlib/_io.rs

Calls 5

ensure_unclosedFunction · 0.85
check_initMethod · 0.80
readinto_genericMethod · 0.80
lockMethod · 0.45
readerMethod · 0.45

Tested by

no test coverage detected