Skip to main content

Batch

Struct Batch 

Source
pub struct Batch<'a, P: SignatureProvider<'a>> { /* private fields */ }
Expand description

Resolved requests bound to one exact provider instance and original ranges.

Call prepare::resolve for every selected signer before constructing this batch. Unsupported/malformed preparation answers remain independent facts in the caller; only Ready requests can enter this driver. Selection, SID binding, ESS/path restrictions and multi-signer policy remain separate.

Implementations§

Source§

impl<'a, P: SignatureProvider<'a>> Batch<'a, P>

Source

pub fn prepare<W: Work>( provider: &'a P, requests: OwnedVec<ResolvedSigner<'a, P>>, execution: &W, field: &'static str, at: u64, ) -> Result<Self, CheckError<P::Error>>

Admits metadata and verifies provider identity before initializing states.

Raw direct signatures need no unused digest state, but their declared digestAlgorithm was still resolved by prepare::resolve before this call. Raw states receive original signatures/effective keys before payload I/O; signedAttrs states never receive payload bytes in place of attrs bytes.

Source

pub fn run<S: Source, W: Work>( self, source: &mut S, execution: &W, ) -> Result<OwnedVec<Checked<'a>>, PassError<S::Error, P::Error>>

Executes one payload pass and returns facts only after complete successful EOF.

Original retagged signedAttrs have their own signature input. Their message-digest is compared against the payload output first (RFC5652 §§5.4–5.6), then raw attrs or its separately finalized typed prehash is checked. No identity/state Clone, payload replay or re-encoding occurs. https://www.rfc-editor.org/rfc/rfc5652#section-5.4

Auto Trait Implementations§

§

impl<'a, P> !Freeze for Batch<'a, P>

§

impl<'a, P> !RefUnwindSafe for Batch<'a, P>

§

impl<'a, P> !Send for Batch<'a, P>

§

impl<'a, P> !Sync for Batch<'a, P>

§

impl<'a, P> !UnwindSafe for Batch<'a, P>

§

impl<'a, P> Unpin for Batch<'a, P>
where &'a P: Unpin, PayloadBatch<'a, P>: Unpin, OwnedVec<Pending<'a, P>>: Unpin,

§

impl<'a, P> UnsafeUnpin for Batch<'a, P>
where &'a P: UnsafeUnpin, PayloadBatch<'a, P>: UnsafeUnpin, OwnedVec<Pending<'a, P>>: UnsafeUnpin,

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.