(py: Python, obj: &'s PyObject)
| 499 | /// not valid UTF-8). |
| 500 | impl<'s> FromPyObject<'s> for Cow<'s, str> { |
| 501 | fn extract(py: Python, obj: &'s PyObject) -> PyResult<Self> { |
| 502 | obj.cast_as::<PyString>(py)?.to_string(py) |
| 503 | } |
| 504 | } |
| 505 | |
| 506 | /// Allows extracting strings from Python objects. |
nothing calls this directly
no test coverage detected