Trait async_acme::cache::AcmeCache[][src]

pub trait AcmeCache {
    type Error: CacheError;
    fn read_account<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        contacts: &'life1 [&'life2 str]
    ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
fn write_account<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        contacts: &'life1 [&'life2 str],
        data: &'life3 [u8]
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
;
fn write_certificate<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        domains: &'life1 [String],
        directory_url: &'life2 str,
        key_pem: &'life3 str,
        certificate_pem: &'life4 str
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        'life4: 'async_trait,
        Self: 'async_trait
; }
Expand description

Trait to define a custom location/mechanism to cache account data and certificates.

Associated Types

The error type returned from the functions on this trait.

Required methods

Returns the previously written data for contacts, if any. This function should return None instead of erroring if data was not previously written for contacts.

Writes data for contacts. The data being written is unique for the combined list of contacts.

Errors

Returns an error when data was unable to be written successfully.

Writes a certificate retrieved from Acme. The parameters are:

Parameters
  • domains: the list of domains included in the certificate.
  • directory_url: the Url of the Acme directory that this certificate was issued form.
  • key_pem: the private key, encoded in PEM format.
  • certificate_pem: the certificate chain, encoded in PEM format.
Errors

Returns an error when the certificate was unable to be written sucessfully.

Implementors