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

Method new_pyref

crates/vm/src/vm/context.rs:471–477  ·  view source on GitHub ↗

universal pyref constructor

(&self, value: T)

Source from the content-addressed store, hash-verified

469
470 // universal pyref constructor
471 pub fn new_pyref<T, P>(&self, value: T) -> PyRef<P>
472 where
473 T: Into<P>,
474 P: PyPayload + core::fmt::Debug,
475 {
476 value.into().into_ref(self)
477 }
478
479 // shortcuts for common type
480

Callers 7

decompress_innerMethod · 0.80
from_statMethod · 0.80
lstripMethod · 0.80
rstripMethod · 0.80
newMethod · 0.80
__getitem__Method · 0.80
slot_newMethod · 0.80

Calls 1

into_refMethod · 0.45

Tested by

no test coverage detected