pub trait CatalogResource: Hostable {
type Config: CatalogService + Send + Sync;
const PROVIDER_PREFIX: &'static str;
const OUTPUT_FIELDS: &'static [(&'static str, &'static str, bool)];
// Required method
fn build_config(
ctx: &ProvisionContext<'_>,
) -> Result<Self::Config, IntegrationError>;
}Expand description
A catalog resource: a typed config + the credential fields it exposes. The
ProviderOps lifecycle is derived (blanket impl below), so a new resource is
just this trait + a Hostable + one registry row.
Required Associated Constants§
Sourceconst PROVIDER_PREFIX: &'static str
const PROVIDER_PREFIX: &'static str
The env-var prefix the provider uses for the unambiguous form, e.g.
"CLOUDFLARE" (vars come back as {RESOURCE}_{SUFFIX} or {PROVIDER}_{SUFFIX}).
Sourceconst OUTPUT_FIELDS: &'static [(&'static str, &'static str, bool)]
const OUTPUT_FIELDS: &'static [(&'static str, &'static str, bool)]
(env-var suffix, output name, required). Discover the real suffixes with
xtask discover <reference>; pinned by the live smoke.
Required Associated Types§
type Config: CatalogService + Send + Sync
Required Methods§
fn build_config( ctx: &ProvisionContext<'_>, ) -> Result<Self::Config, IntegrationError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".