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

Method load_from_file

crates/stdlib/src/ssl/cert.rs:641–644  ·  view source on GitHub ↗

Load certificates from a file (supports both PEM and DER formats) Returns statistics about loaded certificates

(&mut self, path: &str)

Source from the content-addressed store, hash-verified

639 ///
640 /// Returns statistics about loaded certificates
641 pub fn load_from_file(&mut self, path: &str) -> Result<CertStats, std::io::Error> {
642 let contents = std::fs::read(path)?;
643 self.load_from_bytes(&contents)
644 }
645
646 /// Load certificates from a directory
647 ///

Callers 2

Calls 2

load_from_bytesMethod · 0.80
readFunction · 0.50

Tested by

no test coverage detected