Skip to main content

DigestBatch

Struct DigestBatch 

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

Source

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.

Source

pub fn len(&self) -> usize

Number of unique resolved digest states, without rescanning identities.

Source

pub fn is_empty(&self) -> bool

Whether no digest was requested.

Source

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.

Auto Trait Implementations§

§

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

§

impl<'a, P> RefUnwindSafe for DigestBatch<'a, P>
where &'a P: RefUnwindSafe, OwnedVec<Pending<<P as Digest<'a>>::Identity, <P as Digest<'a>>::State>>: RefUnwindSafe,

§

impl<'a, P> Send for DigestBatch<'a, P>
where &'a P: Send, OwnedVec<Pending<<P as Digest<'a>>::Identity, <P as Digest<'a>>::State>>: Send,

§

impl<'a, P> Sync for DigestBatch<'a, P>
where &'a P: Sync, OwnedVec<Pending<<P as Digest<'a>>::Identity, <P as Digest<'a>>::State>>: Sync,

§

impl<'a, P> Unpin for DigestBatch<'a, P>
where &'a P: Unpin, OwnedVec<Pending<<P as Digest<'a>>::Identity, <P as Digest<'a>>::State>>: Unpin,

§

impl<'a, P> UnsafeUnpin for DigestBatch<'a, P>
where &'a P: UnsafeUnpin, OwnedVec<Pending<<P as Digest<'a>>::Identity, <P as Digest<'a>>::State>>: UnsafeUnpin,

§

impl<'a, P> UnwindSafe for DigestBatch<'a, P>
where &'a P: UnwindSafe, OwnedVec<Pending<<P as Digest<'a>>::Identity, <P as Digest<'a>>::State>>: 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.