macro_rules! patch_callback_if_settable_sender {
    ($py:ident, $sender:ident, $callback:ident, $pyclass_name:expr) => { ... };
}
Expand description

Marco will patch the PyObject if it is an instance of links_connect.callbacks.SettableSender by setting the sender attribute to the provided sender argument.

§Arguments

  • py - python interpreter token [Python<'_>]
  • sender - This is a Rust class instance of type [macro@pyo3::pyclass]
  • callback - This is a pyo3::PyObject representing a callback for on_sent and on_recv events for which a reference will be stored in the sender property of the
  • pyclass_name - This is a string literal representing the name of the python class for which the callback is being patched, it is used for logging purposes