v0.5.1
This release adds WrapGuard and WrapExtractor generic helpers that eliminate repetitive pointer-to-value callback wrapping across all primitive builders.
Added
generic.WrapGuard: Converts a value-receiver guard callback into a pointer-receiver callback for the generic builder layer. Handles nil passthrough.generic.WrapExtractor: Converts a value-receiver data extractor callback into a pointer-receiver callback for the generic builder layer. Handles nil passthrough.
Changed
- All 25 primitive builders (21 typed + 4 unstructured) now use
WrapGuardandWrapExtractorinstead of inline nil-check and closure wrapping in theirWithGuardandWithDataExtractormethods.
Docs
- Added
Guardableto the custom resource and unstructured primitive documentation. - Rewrote the custom resource mutator example to properly demonstrate
NextFeatureand per-feature plan scoping. - Updated the custom resource builder example to use value-type callbacks with
WrapGuardandWrapExtractor.