/// Returns the current certificate chain.
Returns the current certificate chain.
Returns the current certificate chain .
pub async fn certificate_chain(&self) -> Result<CertificateChain, Error> {
        let db = self.hosted().await;
        if let Some(mapping) = db
            .view::<TlsCertificatesByDomain>()
            .with_key(self.data.primary_domain.clone())
            .query()
            .await?
            .into_iter()
            .next()
        {
            Ok(mapping.value)
        } else {
            Err(Error::Core(bonsaidb_core::Error::Configuration(format!(
                "no certificate found for {}",
                self.data.primary_domain
            ))))
        }
    }
pub async fn certificate_chain ( & self ) -> Result < CertificateChain , Error > { let db = self . hosted ( ) . await ; if let Some ( mapping ) = db . view :: < TlsCertificatesByDomain > ( ) . with_key ( self . data . primary_domain . clone ( ) ) . query ( ) . await ? . into_iter ( ) . next ( ) { Ok ( mapping . value ) } else { Err ( Error :: Core ( bonsaidb_core :: Error :: Configuration ( format ! ( " " self data primary_domain ) ) ) ) } }
Returns the current certificate chain.
Returns the current certificate chain .
&self