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

Method set__msg_callback

crates/stdlib/src/ssl.rs:1678–1692  ·  view source on GitHub ↗
(
            &self,
            callback: Option<PyObjectRef>,
            vm: &VirtualMachine,
        )

Source from the content-addressed store, hash-verified

1676
1677 #[pygetset(setter)]
1678 fn set__msg_callback(
1679 &self,
1680 callback: Option<PyObjectRef>,
1681 vm: &VirtualMachine,
1682 ) -> PyResult<()> {
1683 // Validate callback is callable or None
1684 if let Some(ref cb) = callback
1685 && !cb.is(vm.ctx.types.none_type)
1686 && !cb.is_callable()
1687 {
1688 return Err(vm.new_type_error("msg_callback must be callable or None"));
1689 }
1690 *self.msg_callback.write() = callback;
1691 Ok(())
1692 }
1693
1694 #[pymethod]
1695 fn get_ca_certs(&self, args: GetCertArgs, vm: &VirtualMachine) -> PyResult<PyListRef> {

Callers

nothing calls this directly

Calls 4

isMethod · 0.80
is_callableMethod · 0.80
ErrClass · 0.50
writeMethod · 0.45

Tested by

no test coverage detected