#[path = "face_external.rs"]
mod face_external;
#[path = "face_helpers.rs"]
mod face_helpers;
#[path = "face_objects.rs"]
mod face_objects;
#[path = "face_registration.rs"]
mod face_registration;
#[doc(hidden)]
pub struct FaceFields<
SourceValue,
KindValue,
PresetValue,
PartsValue,
NameValue,
SummaryValue,
ExportsValue,
StableNameValue,
NeedsRegistryValue,
ParentValue,
GettingFromOtherRegistryValue,
RegistryRulePathValue,
RegistryRuleValue,
AdmissionValue,
HandleTraitsValue,
HandleContractsValue,
PartTraitsValue,
PartContractsValue,
RequiresValue,
ProvidesValue,
FlowValue,
FlowProviderValue,
PluginValue,
RuntimeChecksValue,
> {
pub source: SourceValue,
pub kind: KindValue,
pub preset: PresetValue,
pub parts: PartsValue,
pub name: NameValue,
pub summary: SummaryValue,
pub exports: ExportsValue,
pub stable_name: StableNameValue,
pub needs_registry: NeedsRegistryValue,
pub parent: ParentValue,
pub getting_from_other_registry: GettingFromOtherRegistryValue,
pub registry_rule_path: RegistryRulePathValue,
pub registry_rule: RegistryRuleValue,
pub admission: AdmissionValue,
pub handle_traits: HandleTraitsValue,
pub handle_contracts: HandleContractsValue,
pub part_traits: PartTraitsValue,
pub part_contracts: PartContractsValue,
pub requires: RequiresValue,
pub provides: ProvidesValue,
pub flow: FlowValue,
pub flow_provider: FlowProviderValue,
pub plugin: PluginValue,
pub runtime_checks: RuntimeChecksValue,
}
#[cfg(test)]
mod tests {
use nichlink::registry_core::declaration::FACE_FIELD_ORDER;
#[test]
fn the_field_mirror_matches_the_declared_order() {
let source = include_str!("face.rs");
let needle = ["pub struct ", "FaceFields"].concat();
let start = source.find(&needle).expect("field mirror");
let end = source[start..].find("\n}").expect("field mirror end") + start;
let mirrored = source[start..end]
.lines()
.filter_map(|line| {
let line = line.trim();
let name = line.strip_prefix("pub ")?.split_once(": ")?.0;
Some(name)
})
.collect::<Vec<_>>();
assert_eq!(mirrored, FACE_FIELD_ORDER);
}
}