pub struct CertificateStore { /* private fields */ }Expand description
Certificate store for persistence
Implementations§
Source§impl CertificateStore
impl CertificateStore
Sourcepub fn account_path(&self) -> PathBuf
pub fn account_path(&self) -> PathBuf
Get path for account credentials
Sourcepub fn certificate_path(&self, domain: &str) -> PathBuf
pub fn certificate_path(&self, domain: &str) -> PathBuf
Get path for certificate file
Sourcepub fn cert_pem_path(&self, domain: &str) -> PathBuf
pub fn cert_pem_path(&self, domain: &str) -> PathBuf
Get path for certificate PEM file
Sourcepub fn key_pem_path(&self, domain: &str) -> PathBuf
pub fn key_pem_path(&self, domain: &str) -> PathBuf
Get path for private key PEM file
Sourcepub async fn init(&self) -> AutoTlsResult<()>
pub async fn init(&self) -> AutoTlsResult<()>
Initialize storage directory
Sourcepub async fn save_certificate(
&self,
domain: &str,
certificate: &str,
private_key: &str,
) -> AutoTlsResult<()>
pub async fn save_certificate( &self, domain: &str, certificate: &str, private_key: &str, ) -> AutoTlsResult<()>
Save certificate to storage
Sourcepub async fn save_certificate_with_expiry(
&self,
domain: &str,
certificate: &str,
private_key: &str,
expires_at: u64,
) -> AutoTlsResult<()>
pub async fn save_certificate_with_expiry( &self, domain: &str, certificate: &str, private_key: &str, expires_at: u64, ) -> AutoTlsResult<()>
Save certificate with custom expiry time
Sourcepub async fn load_certificate(
&self,
domain: &str,
) -> AutoTlsResult<Option<StoredCertificate>>
pub async fn load_certificate( &self, domain: &str, ) -> AutoTlsResult<Option<StoredCertificate>>
Load certificate from storage
Sourcepub async fn delete_certificate(&self, domain: &str) -> AutoTlsResult<()>
pub async fn delete_certificate(&self, domain: &str) -> AutoTlsResult<()>
Delete certificate from storage
Sourcepub async fn list_certificates(&self) -> AutoTlsResult<Vec<String>>
pub async fn list_certificates(&self) -> AutoTlsResult<Vec<String>>
List all stored certificates
Sourcepub async fn cleanup_expired(&self) -> AutoTlsResult<Vec<String>>
pub async fn cleanup_expired(&self) -> AutoTlsResult<Vec<String>>
Clean up expired certificates
Trait Implementations§
Source§impl Clone for CertificateStore
impl Clone for CertificateStore
Source§fn clone(&self) -> CertificateStore
fn clone(&self) -> CertificateStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CertificateStore
impl RefUnwindSafe for CertificateStore
impl Send for CertificateStore
impl Sync for CertificateStore
impl Unpin for CertificateStore
impl UnsafeUnpin for CertificateStore
impl UnwindSafe for CertificateStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more