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

Method downgrade

crates/vm/src/object/core.rs:1389–1395  ·  view source on GitHub ↗
(
        &self,
        callback: Option<PyObjectRef>,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

1387 }
1388
1389 pub fn downgrade(
1390 &self,
1391 callback: Option<PyObjectRef>,
1392 vm: &VirtualMachine,
1393 ) -> PyResult<PyRef<PyWeak>> {
1394 self.downgrade_with_typ(callback, vm.ctx.types.weakref_type.to_owned(), vm)
1395 }
1396
1397 pub fn get_weak_references(&self) -> Option<Vec<PyRef<PyWeak>>> {
1398 self.weak_ref_list()

Callers 8

push_held_rcMethod · 0.45
_wrap_socketMethod · 0.45
_wrap_bioMethod · 0.45
set_ownerMethod · 0.45
in_weak_setFunction · 0.45
add_to_weak_setFunction · 0.45
nextMethod · 0.45

Calls 3

downgrade_with_typMethod · 0.80
to_ownedMethod · 0.45
as_objectMethod · 0.45

Tested by

no test coverage detected