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

Method build_method

crates/vm/src/function/method.rs:176–184  ·  view source on GitHub ↗
(
        &'static self,
        ctx: &Context,
        class: &'static Py<PyType>,
    )

Source from the content-addressed store, hash-verified

174 }
175
176 pub fn build_method(
177 &'static self,
178 ctx: &Context,
179 class: &'static Py<PyType>,
180 ) -> PyRef<PyMethodDescriptor> {
181 debug_assert!(self.flags.contains(PyMethodFlags::METHOD));
182 let method = self.to_method(class, ctx);
183 PyRef::new_ref(method, ctx.types.method_descriptor_type.to_owned(), None)
184 }
185
186 pub fn build_bound_method(
187 &'static self,

Callers 2

to_proper_methodMethod · 0.80
new_methodMethod · 0.80

Calls 4

to_methodMethod · 0.80
SomeClass · 0.50
to_ownedMethod · 0.45
methodMethod · 0.45

Tested by

no test coverage detected