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

Method readinto1

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

Source from the content-addressed store, hash-verified

1915
1916 #[pymethod]
1917 fn readinto1(&self, buf: ArgMemoryBuffer, vm: &VirtualMachine) -> PyResult<Option<usize>> {
1918 let mut data = self.reader().lock(vm)?;
1919 let raw = data.check_init(vm)?;
1920 ensure_unclosed(raw, "readinto of closed file", vm)?;
1921 data.readinto_generic(buf.into(), true, vm)
1922 }
1923
1924 #[pymethod]
1925 fn flush(&self, vm: &VirtualMachine) -> PyResult<()> {

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