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

Function check_decoded

crates/vm/src/stdlib/_io.rs:402–409  ·  view source on GitHub ↗
(decoded: PyObjectRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

400 }
401
402 fn check_decoded(decoded: PyObjectRef, vm: &VirtualMachine) -> PyResult<PyStrRef> {
403 decoded.downcast().map_err(|obj| {
404 vm.new_type_error(format!(
405 "decoder should return a string result, not '{}'",
406 obj.class().name()
407 ))
408 })
409 }
410
411 #[pyattr]
412 #[pyclass(name = "_IOBase")]

Callers 4

seekMethod · 0.85
tellMethod · 0.85
readMethod · 0.85
read_chunkMethod · 0.85

Calls 1

downcastMethod · 0.80

Tested by

no test coverage detected