Unified accessors for Fact and FactRef structs.
Avoids pattern-matching on struct types throughout the codebase when only the hash, ancestry, or "has a value?" predicate is needed.
Summary
Functions
Returns the ancestry of a Fact or FactRef.
Returns the hash of a Fact or FactRef.
Converts a Fact to a FactRef, discarding the value.
Returns true if the struct carries a concrete value (only true for Facts with non-nil values).
Functions
@spec ancestry(Runic.Workflow.Fact.t() | Runic.Workflow.FactRef.t()) :: {Runic.Workflow.Fact.hash(), Runic.Workflow.Fact.hash()} | nil
Returns the ancestry of a Fact or FactRef.
@spec hash(Runic.Workflow.Fact.t() | Runic.Workflow.FactRef.t()) :: Runic.Workflow.Fact.hash()
Returns the hash of a Fact or FactRef.
@spec to_ref(Runic.Workflow.Fact.t()) :: Runic.Workflow.FactRef.t()
Converts a Fact to a FactRef, discarding the value.
@spec value?(Runic.Workflow.Fact.t() | Runic.Workflow.FactRef.t()) :: boolean()
Returns true if the struct carries a concrete value (only true for Facts with non-nil values).