Skip to main content

ComputedInput

Trait ComputedInput 

Source
pub trait ComputedInput<P, PE> {
    type Error;

    // Required method
    fn compute<'context, 'reader, 'document>(
        &mut self,
        context: &'context ImprintContext<'reader, 'document, P, Self::Error>,
    ) -> Result<ImprintProof<'context>, InputFailure<Self::Error>>
       where P: AsnDigest<'document, Error = PE>;
}
Expand description

An input recipe executes under the token’s one resolved digest identity.

A recipe can stream several normative alternatives together, or compute a reduced hash tree. It cannot construct an affirmative proof from bytes or a boolean: only this operation’s completed states can be compared with the original declared hash. Provider errors cannot borrow temporary joined information. No identity/state/output cloning is required.

Required Associated Types§

Source

type Error

Original source or recipe failure, independent of semantic disagreement.

Required Methods§

Source

fn compute<'context, 'reader, 'document>( &mut self, context: &'context ImprintContext<'reader, 'document, P, Self::Error>, ) -> Result<ImprintProof<'context>, InputFailure<Self::Error>>
where P: AsnDigest<'document, Error = PE>,

Complete the input, preserving refusal even when a callback ignores it.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<P, PE, S: Source> ComputedInput<P, PE> for RawInput<'_, S>

Source§

type Error = <S as Source>::Error