1 2 3 4 5 6 7 8 9 10 11 12 13
use pyo3::prelude::*; #[pyclass] struct MyClass {} #[pymethods] impl MyClass { fn __truediv__(&self, _py: Python<'_>) -> PyResult<()> { Ok(()) } } fn main() {}