pub struct Batch<'p, P: Digest<'p>, N, D, G> { /* private fields */ }Expand description
One source pass for multiple original XML declarations. Complete native identities move into the existing common batch, which sorts/deduplicates them semantically. No identity/state/output clone or second dispatcher.
Implementations§
Source§impl<'p, P: Digest<'p>, N: Copy + Eq, D: Copy + Eq, G: Copy + Eq> Batch<'p, P, N, D, G>
impl<'p, P: Digest<'p>, N: Copy + Eq, D: Copy + Eq, G: Copy + Eq> Batch<'p, P, N, D, G>
Sourcepub fn prepare<W: Work>(
provider: &'p P,
prepared: OwnedVec<Prepared<'p, P, N, D, G>>,
work: &W,
) -> Result<Self, Error<Infallible, P::Error>>
pub fn prepare<W: Work>( provider: &'p P, prepared: OwnedVec<Prepared<'p, P, N, D, G>>, work: &W, ) -> Result<Self, Error<Infallible, P::Error>>
Consumes declarations whose original XML syntax, widths and provider policy have ALREADY been checked. Do not prepare a subset and start it before validating other declarations in the same operation.
Sourcepub async fn run<X: Xml<Id = N, Document = D, Generation = G>, S: AsyncSource, W: Work>(
self,
xml: &X,
source: &mut S,
work: &W,
) -> BinaryResult<OwnedVec<Agreement>, X, Error<S::Error, P::Error>>
pub async fn run<X: Xml<Id = N, Document = D, Generation = G>, S: AsyncSource, W: Work>( self, xml: &X, source: &mut S, work: &W, ) -> BinaryResult<OwnedVec<Agreement>, X, Error<S::Error, P::Error>>
Checks original generations before source I/O and after await. Only the exact private request mapping supplies each actual output/identity. All declarations survive, including unsupported/malformed readings; a failed source or callback returns no successful partial answer collection.
§Panics
An internal preparation invariant fails if a ready declaration lacks its original native batch or private request-to-output mapping.