MCPcopy Index your code
hub / github.com/RustPython/RustPython / hash

Method hash

crates/stdlib/src/ssl.rs:5149–5153  ·  view source on GitHub ↗
(zelf: &Py<Self>, _vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

5147 // Implement Hashable trait for PySSLCertificate
5148 impl Hashable for PySSLCertificate {
5149 fn hash(zelf: &Py<Self>, _vm: &VirtualMachine) -> PyResult<PyHash> {
5150 let mut hasher = DefaultHasher::new();
5151 zelf.der_bytes.hash(&mut hasher);
5152 Ok(hasher.finish() as PyHash)
5153 }
5154 }
5155
5156 // Implement Representable trait for PySSLCertificate

Callers 3

seedMethod · 0.45
adler32Function · 0.45
idMethod · 0.45

Calls 2

newFunction · 0.85
finishMethod · 0.45

Tested by

no test coverage detected