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

Method into_async_pyresult

crates/vm/src/protocol/iter.rs:192–200  ·  view source on GitHub ↗
(self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

190 }
191
192 pub fn into_async_pyresult(self, vm: &VirtualMachine) -> PyResult {
193 match self {
194 Self::Return(obj) => Ok(obj),
195 Self::StopIteration(v) => Err({
196 let args = if let Some(v) = v { vec![v] } else { Vec::new() };
197 vm.new_exception(vm.ctx.exceptions.stop_async_iteration.to_owned(), args)
198 }),
199 }
200 }
201}
202
203impl ToPyResult for PyIterReturn {

Callers 3

unboxMethod · 0.80
sendMethod · 0.80
throwMethod · 0.80

Calls 4

newFunction · 0.85
new_exceptionMethod · 0.80
ErrClass · 0.50
to_ownedMethod · 0.45

Tested by

no test coverage detected