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

Method to_owned

crates/vm/src/object/ext.rs:115–118  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

113 type Owned = PyRefExact<T>;
114
115 fn to_owned(&self) -> Self::Owned {
116 let owned = self.inner.to_owned();
117 unsafe { PyRefExact::new_unchecked(owned) }
118 }
119}
120
121impl<T: PyPayload> PyRef<T> {

Callers 15

structseq.rsFile · 0.45
from_dataMethod · 0.45
__replace__Method · 0.45
extend_pyclassMethod · 0.45
struct_sequence_iterFunction · 0.45
getattro_wrapperFunction · 0.45
setattro_wrapperFunction · 0.45
richcompare_wrapperFunction · 0.45
slot_callMethod · 0.45
number_downcast_exactMethod · 0.45
from_vectorcallMethod · 0.45
from_vectorcall_ownedMethod · 0.45

Calls 3

to_owned_orderingMethod · 0.80
mapMethod · 0.45
loadMethod · 0.45

Tested by 4

module_execFunction · 0.36
test_lineariseFunction · 0.36
test_nested_frozenFunction · 0.36