pub fn new(
        chain: Vec<key::Certificate>,
        priv_key: &key::PrivateKey,
    ) -> Result<AlwaysResolvesChain, Error> {
        let key = sign::any_supported_type(priv_key)
            .map_err(|_| Error::General("invalid private key".into()))?;
        Ok(AlwaysResolvesChain(Arc::new(sign::CertifiedKey::new(
            chain, key,
        ))))
    }
/// Creates an `AlwaysResolvesChain`, auto-detecting the underlying private
/// key type and encoding.
Creates an `AlwaysResolvesChain`, auto-detecting the underlying private
key type and encoding.
Creates an ` AlwaysResolvesChain ` auto - detecting the underlying private key type and encoding .
pub fn new(
        chain: Vec<key::Certificate>,
        priv_key: &key::PrivateKey,
    ) -> Result<AlwaysResolvesChain, Error> {
        let key = sign::any_supported_type(priv_key)
            .map_err(|_| Error::General("invalid private key".into()))?;
        Ok(AlwaysResolvesChain(Arc::new(sign::CertifiedKey::new(
            chain, key,
        ))))
    }
pub fn new ( chain : Vec < key :: Certificate > , priv_key : & key :: PrivateKey , ) -> Result < AlwaysResolvesChain , Error > { let key = sign :: any_supported_type ( priv_key ) . map_err ( | _ | Error :: General ( " " . into ( ) ) ) ? ; Ok ( AlwaysResolvesChain ( Arc :: new ( sign :: CertifiedKey :: new ( chain , key , ) ) ) ) }
Creates an `AlwaysResolvesChain`, auto-detecting the underlying private
key type and encoding.
Creates an ` AlwaysResolvesChain ` auto - detecting the underlying private key type and encoding .
chain
Vec<key::Certificate>
priv_key
&key::PrivateKey
chain
Vec<key::Certificate>
priv_key
&key::PrivateKey