Classify serialized and runtime schema records

This commit is contained in:
ms2k 2026-07-14 23:34:56 +09:00
commit f106a9f636

View file

@ -2605,14 +2605,18 @@ pub trait SchemaType {
}
macro_rules! schema_types {
($($name:literal => $record:ty),+ $(,)?) => {
($($name:literal => $record:ty),+; $($declared:literal),* $(,)?) => {
$(
impl SchemaType for $record {
const NAME: &'static str = $name;
}
)+
pub const ALL_SCHEMA_TYPE_NAMES: &[&str] = &[$($name),+];
pub const IMPLEMENTED_SERIALIZED_SCHEMA_TYPE_NAMES: &[&str] = &[$($name),+];
pub const DECLARED_SERIALIZED_SCHEMA_TYPE_NAMES: &[&str] = &[
$($name),+,
$($declared),*
];
};
}
@ -2698,5 +2702,16 @@ schema_types!(
"PermittedDestinationObservation" => PermittedDestinationObservation,
"DnsObservation" => DnsObservation,
"DomainStore" => DomainStore,
"StorageCatalog" => StorageCatalog,
"StorageCatalog" => StorageCatalog;
"TrustedHostConfigurationV1",
"ConfigurationFingerprintRecordV1",
"EnvironmentReference",
"ResolvedVolume",
"ResolvedAutoApprovalRule",
);
pub const DECLARED_RUNTIME_SCHEMA_TYPE_NAMES: &[&str] = &[
"ResolvedDomainConfiguration",
"SandboxLayoutV1",
"ConfinedPathPlan",
];