Skip to main content

IacBackend

Trait IacBackend 

Source
pub trait IacBackend<Resource: Sync>: Send + Sync {
    type Error: Error + Send + Sync + 'static;
    type Plan: Send;
    type ApplyResult: Send;

    // Required methods
    fn plan<'a>(
        &'a self,
        desired: &'a Resource,
    ) -> impl Future<Output = Result<Self::Plan, Self::Error>> + Send + 'a;
    fn apply<'a>(
        &'a self,
        desired: &'a Resource,
    ) -> impl Future<Output = Result<Self::ApplyResult, Self::Error>> + Send + 'a;
}
Expand description

Plans and applies a resource’s declarative desired state.

Each resource type has its own implementation, keeping this contract open to resources added by downstream crates. It intentionally promises only plan and apply; backend-specific concepts remain in backend crates.

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Error type returned by this backend.

Source

type Plan: Send

Backend-specific plan representation.

Source

type ApplyResult: Send

Backend-specific apply result.

Required Methods§

Source

fn plan<'a>( &'a self, desired: &'a Resource, ) -> impl Future<Output = Result<Self::Plan, Self::Error>> + Send + 'a

Computes a plan for the desired resource.

Source

fn apply<'a>( &'a self, desired: &'a Resource, ) -> impl Future<Output = Result<Self::ApplyResult, Self::Error>> + Send + 'a

Applies the desired resource.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§