Classify serialized and runtime schema records
This commit is contained in:
parent
b34421efa1
commit
f106a9f636
1 changed files with 697 additions and 110 deletions
|
|
@ -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",
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in a new issue