rust/pyo3-sharedref/tests/test_sharedref.rs
changeset 52610 c25d345f5aa5
parent 52609 d1e304025b90
child 52611 4a73eb3923ac
equal deleted inserted replaced
52609:d1e304025b90 52610:c25d345f5aa5
     1 use pyo3::prelude::*;
     1 use pyo3::prelude::*;
     2 use pyo3_sharedref::*;
     2 use pyo3_sharedref::*;
     3 
     3 
     4 #[pyclass]
     4 #[pyclass]
     5 struct Owner {
     5 struct Owner {
     6     string: PySharedRefCell<String>,
     6     string: PyShareable<String>,
     7 }
     7 }
     8 
     8 
     9 #[pymethods]
     9 #[pymethods]
    10 impl Owner {
    10 impl Owner {
    11     #[new]
    11     #[new]