(&self, py: Python, value: V)
| 166 | /// which `o[key] == value` |
| 167 | #[inline] |
| 168 | pub fn count<V>(&self, py: Python, value: V) -> PyResult<usize> |
| 169 | where |
| 170 | V: ToPyObject, |
| 171 | { |
| 172 | let r = value.with_borrowed_ptr(py, |ptr| unsafe { |
| 173 | ffi::PySequence_Count(self.as_ptr(), ptr) |
| 174 | }); |
| 175 | if r == -1 { |
| 176 | Err(PyErr::fetch(py)) |
| 177 | } else { |
| 178 | Ok(r as usize) |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | /// Determine if o contains value. this is equivalent to the Python expression `value in o` |
| 183 | #[inline] |
nothing calls this directly
no test coverage detected