Skip to main content

Batch

Struct Batch 

Source
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>

Source

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.

Source

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.

Auto Trait Implementations§

§

impl<'p, P, N, D, G> !Freeze for Batch<'p, P, N, D, G>

§

impl<'p, P, N, D, G> Forget for Batch<'p, P, N, D, G>

§

impl<'p, P, N, D, G> RefUnwindSafe for Batch<'p, P, N, D, G>

§

impl<'p, P, N, D, G> Send for Batch<'p, P, N, D, G>
where &'p P: Send, OwnedVec<Declared<N, D, G>>: Send, Option<DigestBatch<'p, P>>: Send,

§

impl<'p, P, N, D, G> Sync for Batch<'p, P, N, D, G>
where &'p P: Sync, OwnedVec<Declared<N, D, G>>: Sync, Option<DigestBatch<'p, P>>: Sync,

§

impl<'p, P, N, D, G> Unpin for Batch<'p, P, N, D, G>
where &'p P: Unpin, OwnedVec<Declared<N, D, G>>: Unpin, Option<DigestBatch<'p, P>>: Unpin,

§

impl<'p, P, N, D, G> UnsafeUnpin for Batch<'p, P, N, D, G>
where &'p P: UnsafeUnpin, OwnedVec<Declared<N, D, G>>: UnsafeUnpin, Option<DigestBatch<'p, P>>: UnsafeUnpin,

§

impl<'p, P, N, D, G> UnwindSafe for Batch<'p, P, N, D, G>
where &'p P: UnwindSafe, OwnedVec<Declared<N, D, G>>: UnwindSafe, Option<DigestBatch<'p, P>>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.