Skip to main content

LicenseStore

Trait LicenseStore 

Source
pub trait LicenseStore: Send + Sync {
    // Required methods
    fn create_license<'life0, 'life1, 'async_trait>(
        &'life0 self,
        l: &'life1 License,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_license<'life0, 'async_trait>(
        &'life0 self,
        id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Option<License>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_licenses_for_customer<'life0, 'async_trait>(
        &'life0 self,
        customer_id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<License>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_license_status<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: Uuid,
        status: LicenseStatus,
        revoked_at: Option<i64>,
        revocation_reason: Option<&'life1 str>,
        superseded_by: Option<Uuid>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn update_license_email_sent<'life0, 'async_trait>(
        &'life0 self,
        id: Uuid,
        sent_at: i64,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_consent_record<'life0, 'life1, 'async_trait>(
        &'life0 self,
        r: &'life1 ConsentRecord,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_consent_record<'life0, 'async_trait>(
        &'life0 self,
        id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Option<ConsentRecord>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_consent_records_for_license<'life0, 'async_trait>(
        &'life0 self,
        license_id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ConsentRecord>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn create_license<'life0, 'life1, 'async_trait>( &'life0 self, l: &'life1 License, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_license<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<License>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_licenses_for_customer<'life0, 'async_trait>( &'life0 self, customer_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<License>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn update_license_status<'life0, 'life1, 'async_trait>( &'life0 self, id: Uuid, status: LicenseStatus, revoked_at: Option<i64>, revocation_reason: Option<&'life1 str>, superseded_by: Option<Uuid>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn update_license_email_sent<'life0, 'async_trait>( &'life0 self, id: Uuid, sent_at: i64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§