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

Method repr_str

crates/stdlib/src/_asyncio.rs:831–839  ·  view source on GitHub ↗
(zelf: &Py<Self>, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

829
830 impl Representable for PyFuture {
831 fn repr_str(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<String> {
832 let class_name = zelf.class().name().to_string();
833 if let Some(_guard) = ReprGuard::enter(vm, zelf.as_object()) {
834 let info = get_future_repr_info(zelf.as_object(), vm)?;
835 Ok(format!("<{} {}>", class_name, info))
836 } else {
837 Ok(format!("<{} ...>", class_name))
838 }
839 }
840 }
841
842 impl Iterable for PyFuture {

Callers

nothing calls this directly

Calls 5

get_future_repr_infoFunction · 0.85
to_stringMethod · 0.80
nameMethod · 0.45
classMethod · 0.45
as_objectMethod · 0.45

Tested by

no test coverage detected