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

Function register

crates/vm/src/stdlib/_codecs.rs:21–23  ·  view source on GitHub ↗
(search_function: PyObjectRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

19
20 #[pyfunction]
21 fn register(search_function: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {
22 vm.state.codec_registry.register(search_function, vm)
23 }
24
25 #[pyfunction]
26 fn unregister(search_function: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {

Callers

nothing calls this directly

Calls 1

registerMethod · 0.45

Tested by

no test coverage detected