pyo3 0.18.0

Bindings to Python interpreter
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
error[E0277]: the trait bound `i32: From<&PyCell<MyClass>>` is not satisfied
 --> tests/ui/invalid_pymethod_receiver.rs:8:43
  |
8 |     fn method_with_invalid_self_type(slf: i32, py: Python<'_>, index: u32) {}
  |                                           ^^^ the trait `From<&PyCell<MyClass>>` is not implemented for `i32`
  |
  = help: the following other types implement trait `From<T>`:
            <f32 as From<i16>>
            <f32 as From<i8>>
            <f32 as From<u16>>
            <f32 as From<u8>>
            <f64 as From<f32>>
            <f64 as From<i16>>
            <f64 as From<i32>>
            <f64 as From<i8>>
          and $N others
  = note: required for `&PyCell<MyClass>` to implement `Into<i32>`
  = note: required for `i32` to implement `TryFrom<&PyCell<MyClass>>`