pub struct DigestBatch<'a, P: Digest<'a>> { /* private fields */ }Expand description
Prepared states from one selected provider; no state cloning or source replay.
Implementations§
Source§impl<'a, P: Digest<'a>> DigestBatch<'a, P>
impl<'a, P: Digest<'a>> DigestBatch<'a, P>
Sourcepub fn prepare<W: Work>(
provider: &'a P,
identities: OwnedVec<P::Identity>,
execution: &W,
field: &'static str,
at: u64,
) -> Result<Self, DigestError<P::Error>>
pub fn prepare<W: Work>( provider: &'a P, identities: OwnedVec<P::Identity>, execution: &W, field: &'static str, at: u64, ) -> Result<Self, DigestError<P::Error>>
Moves resolved identities into the current operation and initializes each once.
Identities must come from this selected provider’s resolver. They are
sorted and deduplicated through its fallible semantic comparison, not
OID/width equality. Admission precedes every callback, move and allocation.
field/at identify the caller’s enclosing original source structure.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Number of unique resolved digest states, without rescanning identities.
Sourcepub fn run<S: Source, W: Work>(
self,
source: &mut S,
execution: &W,
) -> Result<DigestMemo<'a, P>, PassError<S::Error, P::Error>>
pub fn run<S: Source, W: Work>( self, source: &mut S, execution: &W, ) -> Result<DigestMemo<'a, P>, PassError<S::Error, P::Error>>
Feeds the source once; outputs are finalized only after complete successful EOF.
A source or callback error drops every unfinished state and partial output. No partial digest is returned, and a source ignoring a refused write cannot make subsequent callbacks run or turn refusal into success.
Sourcepub fn run_requests<S: RequestSource<'a, P>, W: Work>(
self,
source: &mut S,
execution: &W,
) -> PassResult<DigestMemo<'a, P>, S::Error, P::Error>
pub fn run_requests<S: RequestSource<'a, P>, W: Work>( self, source: &mut S, execution: &W, ) -> PassResult<DigestMemo<'a, P>, S::Error, P::Error>
Completes algorithm-dependent derived inputs, once per distinct full identity. The callback receives the first ORIGINAL request ordinal, preserving the prepare mapping after identity sorting/deduplication.
TS101733 §6.5.1’s PoE preimage is eight hashes under the selected
algorithm, so different algorithms cannot share one literal byte stream.
All states, sticky stream errors, output widths and finalization use
exactly the same kernels as Self::run. No raw-output constructor or
unchecked digest/identity pair is exposed.