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

Method with_module

crates/vm/src/builtins/builtin_func.rs:43–46  ·  view source on GitHub ↗
(mut self, module: &'static PyStrInterned)

Source from the content-addressed store, hash-verified

41
42impl PyNativeFunction {
43 pub const fn with_module(mut self, module: &'static PyStrInterned) -> Self {
44 self.module = Some(module);
45 self
46 }
47
48 pub fn into_ref(self, ctx: &Context) -> PyRef<Self> {
49 PyRef::new_ref(

Callers 1

__init_methodsMethod · 0.80

Calls 1

SomeClass · 0.50

Tested by

no test coverage detected