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

Method flush

crates/vm/src/stdlib/_io.rs:2045–2050  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

2043
2044 #[pymethod]
2045 fn flush(&self, vm: &VirtualMachine) -> PyResult<()> {
2046 let mut data = self.writer().lock(vm)?;
2047 let raw = data.check_init(vm)?;
2048 ensure_unclosed(raw, "flush of closed file", vm)?;
2049 data.flush_rewind(vm)
2050 }
2051 }
2052
2053 #[pyattr]

Callers

nothing calls this directly

Implementers 1

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

Calls 5

ensure_unclosedFunction · 0.85
check_initMethod · 0.80
flush_rewindMethod · 0.80
lockMethod · 0.45
writerMethod · 0.45

Tested by

no test coverage detected