Skip to main content

ProviderOps

Trait ProviderOps 

Source
pub trait ProviderOps: Send + Sync {
    // Required methods
    fn provision<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>(
        &'life0 self,
        stripe: &'life1 StripeProjects<&'life2 dyn CommandRunner>,
        def: &'life3 StackDef,
        definition_dir: &'life4 Path,
        instance: &'life5 str,
        name: &'life6 str,
        substrate: &'life7 str,
        skip_stripe_instance_context: bool,
    ) -> Pin<Box<dyn Future<Output = Result<StepResource, IntegrationError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait,
             'life5: 'async_trait,
             'life6: 'async_trait,
             'life7: 'async_trait,
             Self: 'async_trait;
    fn observe<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        stripe: &'life1 StripeProjects<&'life2 dyn CommandRunner>,
        checkpoint_payload: &'life3 str,
        fallback_resource: &'life4 str,
    ) -> Pin<Box<dyn Future<Output = Result<IntegrationObservation, IntegrationError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait,
             Self: 'async_trait;
    fn destroy<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
        &'life0 self,
        stripe: &'life1 StripeProjects<&'life2 dyn CommandRunner>,
        checkpoint_payload: &'life3 str,
        fallback_resource: &'life4 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), IntegrationError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait,
             Self: 'async_trait;

    // Provided method
    fn apply<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
        &'life0 self,
        _stripe: &'life1 StripeProjects<&'life2 dyn CommandRunner>,
        _def: &'life3 StackDef,
        _name: &'life4 str,
        _substrate: &'life5 str,
        _provisioned: &'life6 StepResource,
    ) -> Pin<Box<dyn Future<Output = Result<(), IntegrationError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait,
             'life5: 'async_trait,
             'life6: 'async_trait,
             Self: 'async_trait { ... }
}
Expand description

One integration provider’s lifecycle behaviour. The registry stores a &'static dyn ProviderOps per provider, so adding a provider is one registry row + this impl — dispatch never matches on provider strings.

The runner is erased to &dyn CommandRunner (sound via impl CommandRunner for &T) so the registry table is not generic.

Required Methods§

Source

fn provision<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>( &'life0 self, stripe: &'life1 StripeProjects<&'life2 dyn CommandRunner>, def: &'life3 StackDef, definition_dir: &'life4 Path, instance: &'life5 str, name: &'life6 str, substrate: &'life7 str, skip_stripe_instance_context: bool, ) -> Pin<Box<dyn Future<Output = Result<StepResource, IntegrationError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait, 'life7: 'async_trait, Self: 'async_trait,

Source

fn observe<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, stripe: &'life1 StripeProjects<&'life2 dyn CommandRunner>, checkpoint_payload: &'life3 str, fallback_resource: &'life4 str, ) -> Pin<Box<dyn Future<Output = Result<IntegrationObservation, IntegrationError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, Self: 'async_trait,

Source

fn destroy<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, stripe: &'life1 StripeProjects<&'life2 dyn CommandRunner>, checkpoint_payload: &'life3 str, fallback_resource: &'life4 str, ) -> Pin<Box<dyn Future<Output = Result<(), IntegrationError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, Self: 'async_trait,

Provided Methods§

Source

fn apply<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>( &'life0 self, _stripe: &'life1 StripeProjects<&'life2 dyn CommandRunner>, _def: &'life3 StackDef, _name: &'life4 str, _substrate: &'life5 str, _provisioned: &'life6 StepResource, ) -> Pin<Box<dyn Future<Output = Result<(), IntegrationError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait, Self: 'async_trait,

Post-provision config glue (vendor API toggles, etc.). Called after Self::provision succeeds. Default no-op.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl ProviderOps for ClerkAuth

Source§

impl<T> ProviderOps for T
where T: CatalogResource + Send + Sync,

Every CatalogResource gets its ProviderOps for free — the lifecycle is identical, so a per-resource impl would be pure boilerplate. (Does not conflict with Clerk: ClerkAuth is not a CatalogResource.)