Skip to main content

pyo3/impl_/
deprecated.rs

1pub struct HasAutomaticFromPyObject<const IS_CLONE: bool> {}
2
3impl HasAutomaticFromPyObject<true> {
4    #[deprecated(
5        since = "0.28.0",
6        note = "The `FromPyObject` implementation for `#[pyclass]` types which implement `Clone` is changing to an opt-in option. Use `#[pyclass(from_py_object)]` to opt-in to the `FromPyObject` derive now, or `#[pyclass(skip_from_py_object)]` to skip the `FromPyObject` implementation."
7    )]
8    pub const MSG: () = ();
9}
10
11impl HasAutomaticFromPyObject<false> {
12    pub const MSG: () = ();
13}
⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here