Method
cmp
(
zelf: &Py<Self>,
other: &PyObject,
op: PyComparisonOp,
_vm: &VirtualMachine,
)
Source from the content-addressed store, hash-verified
| 5129 | // Implement Comparable trait for PySSLCertificate |
| 5130 | impl Comparable for PySSLCertificate { |
| 5131 | fn cmp( |
| 5132 | zelf: &Py<Self>, |
| 5133 | other: &PyObject, |
| 5134 | op: PyComparisonOp, |
| 5135 | _vm: &VirtualMachine, |
| 5136 | ) -> PyResult<PyComparisonValue> { |
| 5137 | op.eq_only(|| { |
| 5138 | if let Some(other_cert) = other.downcast_ref::<Self>() { |
| 5139 | Ok((zelf.der_bytes == other_cert.der_bytes).into()) |
| 5140 | } else { |
| 5141 | Ok(PyComparisonValue::NotImplemented) |
| 5142 | } |
| 5143 | }) |
| 5144 | } |
| 5145 | } |
| 5146 | |
| 5147 | // Implement Hashable trait for PySSLCertificate |
Callers
nothing calls this directly
Tested by
no test coverage detected