pub trait CertStorage: Send + Sync {
// Required methods
fn label(&self) -> String;
fn load_account<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, AcmeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn save_account<'life0, 'life1, 'async_trait>(
&'life0 self,
creds: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), AcmeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_cert<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CertId,
) -> Pin<Box<dyn Future<Output = Result<Option<StoredCert>, AcmeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn save_cert<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CertId,
cert: &'life2 StoredCert,
) -> Pin<Box<dyn Future<Output = Result<(), AcmeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn put_challenge<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
domain: &'life1 str,
key_auth: &'life2 str,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = Result<(), AcmeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_challenge<'life0, 'life1, 'async_trait>(
&'life0 self,
domain: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, AcmeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn remove_challenge<'life0, 'life1, 'async_trait>(
&'life0 self,
domain: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), AcmeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn try_acquire_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CertId,
owner: &'life2 str,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = Result<bool, AcmeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn renew_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CertId,
owner: &'life2 str,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = Result<bool, AcmeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn release_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CertId,
owner: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), AcmeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Required Methods§
Sourcefn label(&self) -> String
fn label(&self) -> String
Operator-facing name shown in the Admin API (filesystem, store:<name>).
fn load_account<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, AcmeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save_account<'life0, 'life1, 'async_trait>(
&'life0 self,
creds: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), AcmeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_cert<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CertId,
) -> Pin<Box<dyn Future<Output = Result<Option<StoredCert>, AcmeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_cert<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CertId,
cert: &'life2 StoredCert,
) -> Pin<Box<dyn Future<Output = Result<(), AcmeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn put_challenge<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
domain: &'life1 str,
key_auth: &'life2 str,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = Result<(), AcmeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put_challenge<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
domain: &'life1 str,
key_auth: &'life2 str,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = Result<(), AcmeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Registers key_auth for domain; expires after ttl.
fn get_challenge<'life0, 'life1, 'async_trait>(
&'life0 self,
domain: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, AcmeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_challenge<'life0, 'life1, 'async_trait>(
&'life0 self,
domain: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), AcmeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn try_acquire_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CertId,
owner: &'life2 str,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = Result<bool, AcmeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn try_acquire_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CertId,
owner: &'life2 str,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = Result<bool, AcmeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
true when this owner now holds the lease for id (fresh or already
its own); false when another live owner holds it.
Sourcefn renew_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CertId,
owner: &'life2 str,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = Result<bool, AcmeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn renew_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CertId,
owner: &'life2 str,
ttl: Duration,
) -> Pin<Box<dyn Future<Output = Result<bool, AcmeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Extends the lease iff owner holds it.
Sourcefn release_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CertId,
owner: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), AcmeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn release_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CertId,
owner: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), AcmeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Releases iff owner holds it (a no-op otherwise).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".