We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 443a2c8 commit 6b4efacCopy full SHA for 6b4efac
src/types/function_info.rs
@@ -25,7 +25,7 @@ impl MiddlewareType {
25
}
26
27
#[pyclass]
28
-#[derive(Debug, Clone)]
+#[derive(Debug)]
29
pub struct FunctionInfo {
30
#[pyo3(get, set)]
31
pub handler: Py<PyAny>,
@@ -58,3 +58,17 @@ impl FunctionInfo {
58
59
60
61
+
62
+impl Clone for FunctionInfo {
63
+ fn clone(&self) -> Self {
64
+ Python::with_gil(|py| {
65
+ Self {
66
+ handler: self.handler.clone_ref(py),
67
+ is_async: self.is_async,
68
+ number_of_params: self.number_of_params,
69
+ args: self.args.clone_ref(py),
70
+ kwargs: self.kwargs.clone_ref(py),
71
+ }
72
+ })
73
74
+}
0 commit comments