pub struct ImprintContext<'reader, 'document, P: AsnDigest<'document>, E> { /* private fields */ }Expand description
One original imprint, one provider identity and the current producing work.
The context is constructed only after schema/session/width preflight. Its
non-zero-sized owner distinguishes even otherwise identical operations. All state
transitions retain the first refusal; no RefCell borrow crosses a callback.
Implementations§
Source§impl<'reader, 'document, P: AsnDigest<'document>, E> ImprintContext<'reader, 'document, P, E>
impl<'reader, 'document, P: AsnDigest<'document>, E> ImprintContext<'reader, 'document, P, E>
Sourcepub fn reader(&self) -> &Reader<'document>
pub fn reader(&self) -> &Reader<'document>
Original producing information reader and current operation ceilings.
Sourcepub fn identity(&self) -> &P::Identity
pub fn identity(&self) -> &P::Identity
Full selected-provider identity; output width is not an algorithm ID.
Sourcepub fn start(
&self,
) -> Result<ImprintState<'_, 'reader, 'document, P, E>, Refused>
pub fn start( &self, ) -> Result<ImprintState<'_, 'reader, 'document, P, E>, Refused>
Starts another candidate/intermediate hash under this SAME identity.
Sourcepub fn stream<'context, S: Source<Error = E>>(
&'context self,
source: &mut S,
states: &mut [&mut ImprintState<'context, 'reader, 'document, P, E>],
) -> Result<(), Refused>
pub fn stream<'context, S: Source<Error = E>>( &'context self, source: &mut S, states: &mut [&mut ImprintState<'context, 'reader, 'document, P, E>], ) -> Result<(), Refused>
Feeds every selected state in ONE complete source pass. Empty state lists and foreign contexts refuse before source I/O. Source errors and ignored receiver failures remain sticky across the whole recipe.
Sourcepub fn stream_from<'context, S: Source<Error = E>>(
&'context self,
source: &mut S,
origin: &Reader<'_>,
states: &mut [&mut ImprintState<'context, 'reader, 'document, P, E>],
) -> Result<(), Refused>
pub fn stream_from<'context, S: Source<Error = E>>( &'context self, source: &mut S, origin: &Reader<'_>, states: &mut [&mut ImprintState<'context, 'reader, 'document, P, E>], ) -> Result<(), Refused>
Streams another original source using ITS producing ceiling and this operation’s current root ceilings/account. This does not use the old source’s former account or widen a narrowed current query. The format recipe supplies the actual source reader, never a replacement parser.
Sourcepub fn compare<'context>(
&'context self,
digest: &ImprintDigest<'_, '_, 'document, P, E>,
) -> Result<ImprintProof<'context>, Refused>
pub fn compare<'context>( &'context self, digest: &ImprintDigest<'_, '_, 'document, P, E>, ) -> Result<ImprintProof<'context>, Refused>
Compares one completed output with the original declared hash. Other candidates can be completed and compared without another payload pass.