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§
Sourcetype ApplyResult: Send
type ApplyResult: Send
Backend-specific apply result.
Required Methods§
Sourcefn plan<'a>(
&'a self,
desired: &'a Resource,
) -> impl Future<Output = Result<Self::Plan, Self::Error>> + Send + 'a
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.
Sourcefn apply<'a>(
&'a self,
desired: &'a Resource,
) -> impl Future<Output = Result<Self::ApplyResult, Self::Error>> + Send + 'a
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".