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.