logo
pub trait AcmeCache {
    type Error: CacheError;

    fn read_pkey<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        directory_name: &'life1 str,
        domains: &'life2 [String]
    ) -> 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_pkey<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        directory_name: &'life1 str,
        domains: &'life2 [String],
        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 read_cert<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        directory_name: &'life1 str,
        domains: &'life2 [String]
    ) -> 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_cert<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        directory_name: &'life1 str,
        domains: &'life2 [String],
        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
; }
Available on crate feature acme only.
Expand description

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

Required Associated Types

The error type returned from the functions on this trait.

Required Methods

Returns the previously written private key retrieved from Acme. The parameters are:

Parameters
  • directory_name: the name of the Acme directory that this private key.
  • domains: the list of domains included in the private key was issued form.
Errors

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

Writes a certificate retrieved from Acme. The parameters are:

Parameters
  • directory_name: the name of the Acme directory that this private key.
  • domains: the list of domains included in the private key was issued form.
  • data: the private key, encoded in PEM format.
Errors

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

Returns the previously written certificate retrieved from Acme. The parameters are:

Parameters
  • directory_name: the name of the Acme directory that this certificate
  • domains: the list of domains included in the certificate was issued form.
Errors

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

Writes a certificate retrieved from Acme. The parameters are:

Parameters
  • directory_name: the name of the Acme directory that this certificate
  • domains: the list of domains included in the certificate was issued form.
  • data: the private key, encoded in PEM format.
Errors

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

Implementors