Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
121
impl<T: PyPayload> PyRef<T> {
Callers
15
structseq.rs
File · 0.45
from_data
Method · 0.45
__replace__
Method · 0.45
extend_pyclass
Method · 0.45
struct_sequence_iter
Function · 0.45
getattro_wrapper
Function · 0.45
setattro_wrapper
Function · 0.45
richcompare_wrapper
Function · 0.45
slot_call
Method · 0.45
number_downcast_exact
Method · 0.45
from_vectorcall
Method · 0.45
from_vectorcall_owned
Method · 0.45
Calls
3
to_owned_ordering
Method · 0.80
map
Method · 0.45
load
Method · 0.45
Tested by
4
test_into_native_fn_noalloc
Function · 0.36
module_exec
Function · 0.36
test_linearise
Function · 0.36
test_nested_frozen
Function · 0.36