Method
cmp
(
zelf: &Py<Self>,
other: &PyObject,
op: PyComparisonOp,
vm: &VirtualMachine,
)
Source from the content-addressed store, hash-verified
| 2270 | |
| 2271 | impl Comparable for Row { |
| 2272 | fn cmp( |
| 2273 | zelf: &Py<Self>, |
| 2274 | other: &PyObject, |
| 2275 | op: PyComparisonOp, |
| 2276 | vm: &VirtualMachine, |
| 2277 | ) -> PyResult<PyComparisonValue> { |
| 2278 | op.eq_only(|| { |
| 2279 | if let Some(other) = other.downcast_ref::<Self>() { |
| 2280 | let eq = vm |
| 2281 | .bool_eq(zelf.description.as_object(), other.description.as_object())? |
| 2282 | && vm.bool_eq(zelf.data.as_object(), other.data.as_object())?; |
| 2283 | Ok(eq.into()) |
| 2284 | } else { |
| 2285 | Ok(PyComparisonValue::NotImplemented) |
| 2286 | } |
| 2287 | }) |
| 2288 | } |
| 2289 | } |
| 2290 | |
| 2291 | impl Iterable for Row { |
Callers
nothing calls this directly
Tested by
no test coverage detected