(&self, search_function: PyObjectRef, vm: &VirtualMachine)
| 207 | } |
| 208 | |
| 209 | pub fn register(&self, search_function: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> { |
| 210 | if !search_function.is_callable() { |
| 211 | return Err(vm.new_type_error("argument must be callable")); |
| 212 | } |
| 213 | self.inner.write().search_path.push(search_function); |
| 214 | Ok(()) |
| 215 | } |
| 216 | |
| 217 | pub fn unregister(&self, search_function: PyObjectRef) -> PyResult<()> { |
| 218 | let mut inner = self.inner.write(); |
no test coverage detected