pub enum ModulePhaseKind {
CollectModules,
PartitionOptionsAndConfig,
BuildOptionTree,
GroupDefinitions,
ResolveConditionals,
ResolvePriorities,
MergePerOption,
TypeCheck,
EvaluateRecursive,
EmitConfig,
}Expand description
The closed set of operations any module-eval algorithm composes. Adding a new variant IS adding a new primitive to the spec language.
Variants§
CollectModules
Resolve imports transitively, deduplicating by content
hash. Each module is just an attrset / function; the
fixpoint walks until no new imports appear.
PartitionOptionsAndConfig
Distinguish options from config in every module. Some
modules are pure-config; others declare options.
BuildOptionTree
Walk option declarations, build a typed option tree. The
tree is path-indexed (services.foo.enable).
GroupDefinitions
Walk config definitions, attach each to its option path.
Wrappers (mkDefault, mkForce, mkIf cond, mkMerge)
are unwrapped into typed PriorityRank + value pairs.
ResolveConditionals
Filter out definitions whose mkIf predicate is false.
ResolvePriorities
Sort definitions per option by priority (lowest level wins).
MergePerOption
For each option, run the type’s MergeStrategy over the
surviving definitions. Submodule strategies recurse into
this same algorithm.
TypeCheck
Validate every merged value against its option’s
TypeCheckKind. Failure produces a typed error.
EvaluateRecursive
Walk recursive references between options (cppnix’s
config.foo = config.bar) until fixpoint.
EmitConfig
Produce the final config attrset.
Trait Implementations§
Source§impl Clone for ModulePhaseKind
impl Clone for ModulePhaseKind
Source§fn clone(&self) -> ModulePhaseKind
fn clone(&self) -> ModulePhaseKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ModulePhaseKind
Source§impl Debug for ModulePhaseKind
impl Debug for ModulePhaseKind
Source§impl<'de> Deserialize<'de> for ModulePhaseKind
impl<'de> Deserialize<'de> for ModulePhaseKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ModulePhaseKind
Source§impl PartialEq for ModulePhaseKind
impl PartialEq for ModulePhaseKind
Source§fn eq(&self, other: &ModulePhaseKind) -> bool
fn eq(&self, other: &ModulePhaseKind) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ModulePhaseKind
impl Serialize for ModulePhaseKind
impl StructuralPartialEq for ModulePhaseKind
Auto Trait Implementations§
impl Freeze for ModulePhaseKind
impl RefUnwindSafe for ModulePhaseKind
impl Send for ModulePhaseKind
impl Sync for ModulePhaseKind
impl Unpin for ModulePhaseKind
impl UnsafeUnpin for ModulePhaseKind
impl UnwindSafe for ModulePhaseKind
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.