pub fn from_pem(cert: impl AsRef<[u8]>, key: impl AsRef<[u8]>) -> Self {
        let cert = Certificate::from_pem(cert);
        let key = key.as_ref().into();
        Self { cert, key }
    }
Parse a PEM encoded certificate and private key.

The provided cert must contain at least one PEM encoded certificate.
tonic/src/transport/tls.rs