Skip to main content

SubscriptionOfferStore

Trait SubscriptionOfferStore 

Source
pub trait SubscriptionOfferStore: Send + Sync {
    // Required method
    fn lock_current_offer<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        connection: &'life1 mut PgConnection,
        billing_scope_id: BillingScopeId,
        plan_key: &'life2 PlanKey,
    ) -> Pin<Box<dyn Future<Output = Result<Option<SubscriptionOffer>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}

Required Methods§

Source

fn lock_current_offer<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, connection: &'life1 mut PgConnection, billing_scope_id: BillingScopeId, plan_key: &'life2 PlanKey, ) -> Pin<Box<dyn Future<Output = Result<Option<SubscriptionOffer>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Locks the host-owned row for this exact scope and plan on connection.

Implementations must not acquire another connection. The returned row must remain protected against host price updates until the caller’s transaction ends.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§