pub trait ChainComplexResolver<const INLINE_BYTES: usize, H>: Sealedwhere
H: Hasher,{
// Required method
fn resolve<'a>(
&'a self,
input: TermValue<'a, INLINE_BYTES>,
) -> Result<TermValue<'a, INLINE_BYTES>, ShapeViolation>;
}Expand description
ADR-036 resolver trait: ψ_2 — SimplicialComplex → ChainComplex per ADR-035.
Parameterized by the model’s H-axis (H: Hasher per ADR-022 D5) so
resolver impls compute content-addressed fingerprints using the
model’s chosen hash impl. Sealed via [__sdk_seal::Sealed]: only
the SDK resolver! macro emits impls. Foundation provides a Null
impl whose resolve emits the RESOLVER_ABSENT shape violation.
ADR-060: resolve takes and returns a source-polymorphic
crate::pipeline::TermValue const-generic over the application’s
foundation-derived inline width (INLINE_BYTES = carrier_inline_bytes::<B>()). The resolver constructs whichever
carrier variant its output requires — Inline for structural
identities that fit the inline width, Borrowed into resolver-owned
scratch, or Stream for unbounded structural sequences. There is no
caller-supplied &mut [u8] scratch and no per-ψ-stage byte-width
ceiling (ADR-060 amends the ADR-036/ADR-041 writer-style surface).
Required Methods§
Sourcefn resolve<'a>(
&'a self,
input: TermValue<'a, INLINE_BYTES>,
) -> Result<TermValue<'a, INLINE_BYTES>, ShapeViolation>
fn resolve<'a>( &'a self, input: TermValue<'a, INLINE_BYTES>, ) -> Result<TermValue<'a, INLINE_BYTES>, ShapeViolation>
Resolve per-value content for this category.
§Errors
Returns crate::enforcement::ShapeViolation when the resolver
cannot produce content (e.g., the foundation Null impl carrying
the RESOLVER_ABSENT discriminator).
Implementors§
impl<const INLINE_BYTES: usize, H> ChainComplexResolver<INLINE_BYTES, H> for NullChainComplexResolver<H>where
H: Hasher,
impl<const INLINE_BYTES: usize, H> ChainComplexResolver<INLINE_BYTES, H> for NullResolverTuplewhere
H: Hasher,
ADR-036: NullResolverTuple satisfies ChainComplexResolver<H> directly so
the HasChainComplexResolver<H> accessor can return self cast to &dyn ChainComplexResolver<H>.
The resolve method emits the RESOLVER_ABSENT shape violation —
recoverable via Term::Try’s default-propagation handler (ADR-022 D3 G9).