You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: readers.rs
    path of file: ./repos/habitat/components/core/src/tls/rustls_wrapper
    
    the code of the file until where you have to start completion: //! Utility functions to standardize reading certificates, private keys, and root certificate stor
    
pub fn root_certificate_store_from_file(path: impl AsRef<Path>) -> Result<RootCertStore, Error> {
    let mut buf = buf_from_file(path.as_ref())?;
    let mut root_certificate_store = RootCertStore::empty();
    let certs =
        &rustls_pemfile::certs(&mut buf).map_err(|_| {
                                            Error::FailedToReadRootCertificateStore(path.as_ref()
                                                                                        .into())
                                        })?;
    let (_, failed) = root_certificate_store.add_parsable_certificates(certs);
    if failed > 0 {
        Err(Error::FailedToReadCertificatesFromRootCertificateStore(failed, path.as_ref().into()))
    } else {
        Ok(root_certificate_store)
    }
}