pub struct CompiledSchemaStore { /* private fields */ }Implementations§
Source§impl CompiledSchemaStore
impl CompiledSchemaStore
pub fn new() -> Self
pub fn load_region_data(&mut self, json_bytes: &[u8]) -> Result<(), String>
pub fn get(&self, type_name: &str) -> Option<&CompiledSchema>
Sourcepub fn apply_overlay(
&mut self,
type_name: &str,
raw: &Value,
) -> Result<OverlayOutcome, SchemaOverlayError>
pub fn apply_overlay( &mut self, type_name: &str, raw: &Value, ) -> Result<OverlayOutcome, SchemaOverlayError>
Merge an overlay CloudFormation resource provider schema (raw registry
JSON) into the store under type_name.
The raw schema is compiled with the same transformation used at build time
and deep-merged into the bundled schema for that type; when no bundled
schema exists, the compiled overlay is registered as a new type. The
return value says which happened, so callers can report a type_name that
matched nothing. See the crate::overlay module for the merge
model and its scope limits.
Input is validated before anything is committed - an empty type name,
non-object JSON, nesting past MAX_OVERLAY_DEPTH,
a cyclic definition graph, or an overlay that would change nothing is an
error and leaves the store untouched. The merge therefore runs on a copy
of the bundled schema that is only installed once it validates; a partly
merged schema is never observable.
pub fn len(&self) -> usize
pub fn is_available_in_region(&self, type_name: &str, region: &str) -> bool
Sourcepub fn is_known_in_any_region(&self, type_name: &str) -> bool
pub fn is_known_in_any_region(&self, type_name: &str) -> bool
Whether the type appears in at least one region’s availability map. Used to distinguish a genuine regional provider type (absent only in some regions) from a type that is region-agnostic or not a provider type at all (SAM/transform placeholders), which must not trigger the region check.