fn new(chain: Vec<TlsPublicKeyCert>) -> Result<Self, CspCertificateChainCreationError> {
        if chain.is_empty() {
            return Err(CspCertificateChainCreationError::ChainEmpty);
        }
        Ok(Self { chain })
    }
/// Creates a new certificate chain.
///
/// The first element in the `chain` is considered the `root`. The last
/// element is considered the `leaf`. It is the callers responsibility to
/// ensure that the certificates actually form a chain in terms of
/// issuance.
///
/// Returns an error if the given `chain` is empty.
Creates a new certificate chain.
The first element in the `chain` is considered the `root`. The last
element is considered the `leaf`. It is the callers responsibility to
ensure that the certificates actually form a chain in terms of
issuance.

Returns an error if the given `chain` is empty.
Creates a new certificate chain . The first element in the ` chain ` is considered the ` root ` . The last element is considered the ` leaf ` . It is the callers responsibility to ensure that the certificates actually form a chain in terms of issuance . Returns an error if the given ` chain ` is empty .
fn new(chain: Vec<TlsPublicKeyCert>) -> Result<Self, CspCertificateChainCreationError> {
        if chain.is_empty() {
            return Err(CspCertificateChainCreationError::ChainEmpty);
        }
        Ok(Self { chain })
    }
fn new ( chain : Vec < TlsPublicKeyCert > ) -> Result < Self , CspCertificateChainCreationError > { if chain . is_empty ( ) { return Err ( CspCertificateChainCreationError :: ChainEmpty ) ; } Ok ( Self { chain } ) }
Creates a new certificate chain.
Creates a new certificate chain .
chain
Vec<TlsPublicKeyCert>
chain
Vec<TlsPublicKeyCert>