Skip to main content

ChainComplexResolver

Trait ChainComplexResolver 

Source
pub trait ChainComplexResolver<H>: Sealed
where H: Hasher,
{ // Required method fn resolve( &self, input: SimplicialComplexBytes<'_>, out: &mut [u8], ) -> Result<usize, 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-041: input is a zero-cost typed carrier so ψ-stage composition is type-checked at the resolver-impl boundary.

Required Methods§

Source

fn resolve( &self, input: SimplicialComplexBytes<'_>, out: &mut [u8], ) -> Result<usize, 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§

Source§

impl<H> ChainComplexResolver<H> for NullChainComplexResolver<H>
where H: Hasher,

Source§

impl<H> ChainComplexResolver<H> for NullResolverTuple
where 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).