Expand description
Operator factory errors (Slice H /qa F7, 2026-05-07).
Factory functions in this crate enforce two kinds of invariants:
- Core-layer construction invariants — already typed via
graphrefly_core::RegisterError(unknown dep, terminal-non- resubscribable dep, operator without deps, sentinel seed, etc.). - Factory-shape invariants — pre-conditions on the factory
arguments that Core can’t see because the factory hasn’t yet
constructed the
graphrefly_core::OperatorOpdescriptor (or the Core check would fire with the wrong error message). Examples:combine(sources, packer)requires!sources.is_empty()(Core would surface the same condition asOperatorWithoutDeps, but the factory error is named after the public API).last_with_default(source, default)requiresdefault != NO_HANDLE— Core acceptsLast { default: NO_HANDLE }as the no-default variant (used bylast()), so the factory must enforce its tighter contract.
Both kinds funnel through OperatorFactoryError so factory
callers handle a single error enum. The Core variant is
transparent-wrapped: ? propagation from register_operator(...)?
works directly via the auto-derived From<RegisterError> impl.
Enums§
- Operator
Factory Error - Errors returnable by
crate::combine,crate::merge, [crate::merge_as_op],crate::last_with_default, and [crate::last_with_default_with].