Skip to main content

Input

Struct Input 

Source
pub struct Input<'a, X: TimestampXml> { /* private fields */ }
Expand description

Prepared original input sequence; no canonical XML is buffered here.

Implementations§

Source§

impl<X: TimestampXml> Input<'_, X>

Source

pub fn element_coverage<W: Work>( &self, execution: &W, ) -> Result<CoverageFor<X, W>, CoverageError<<X as Xml>::Error, <X as Xml>::Id>>

Indexes the original elements canonicalized in their entirety by this prepared input, including nested counter-signature/material enclosures. Comments/text are not element claims; arbitrary transformed reference output grants no subtree coverage. The same original Part sequence and explicit successful ElementContent receipts drive replay and selection. Iterative O(depth) cursor frames and an identity set avoid recursive traversal and repeated scans of overlapping original subtrees.

Source§

impl<'a, X: TimestampXml> Input<'a, X>

Source

pub fn prepare_append<W: Work>( xml: &'a X, bound: &Bound<X::Id, X::Document, X::Generation>, kind: AppendKind, method: X::Id, execution: &W, ) -> InputResult<Self, X>

Select the input before the new timestamp exists. method is an actual owner-validated CanonicalizationMethod in this immutable snapshot, including its parameters. It may be in the owner’s unpublished staging area; it must not be a new unsigned property or an extra ds:Object.

EN319132-1 §§5.3/5.5.2.2–3 distinguish creation’s full unsigned tail from validation’s prefix before an existing archive. Any material or RenewedDigestsV2 must already be staged before preparing this input. Mutation invalidates it; obtain a new input/request after any change. https://www.etsi.org/deliver/etsi_en/319100_319199/31913201/01.03.01_60/en_31913201v010301p.pdf

Source

pub fn prepare<W: Work>( xml: &'a X, bound: &Bound<X::Id, X::Document, X::Generation>, stamp: &Timestamp<X>, execution: &W, ) -> InputResult<Self, X>

Selects every original input part before C14N, hashing or source callbacks.

Source

pub fn location(&self) -> (Snapshot<X::Document, X::Generation>, X::Id)

Original enclosing XML location for a logical streamed-source failure. A logical stream offset must never be reported as a physical XML byte offset.

Trait Implementations§

Source§

impl<X: TimestampXml> Source for Input<'_, X>

Source§

type Error = InputError<<X as Xml>::Error, <X as Xml>::Id>

The original acquisition failure, distinct from a signature mismatch.
Source§

fn stream<W: Work>( &mut self, receiver: &mut impl Receiver, execution: &W, ) -> Result<(), Self::Error>

Feeds every chunk once, returning an error for an incomplete source.

Auto Trait Implementations§

§

impl<'a, X> !Freeze for Input<'a, X>

§

impl<'a, X> Forget for Input<'a, X>

§

impl<'a, X> RefUnwindSafe for Input<'a, X>

§

impl<'a, X> Send for Input<'a, X>
where &'a X: Send, Snapshot<<X as Xml>::Document, <X as Xml>::Generation>: Send, <X as Xml>::Id: Send, OwnedVec<Part<<X as Xml>::Id>>: Send,

§

impl<'a, X> Sync for Input<'a, X>
where &'a X: Sync, Snapshot<<X as Xml>::Document, <X as Xml>::Generation>: Sync, <X as Xml>::Id: Sync, OwnedVec<Part<<X as Xml>::Id>>: Sync,

§

impl<'a, X> Unpin for Input<'a, X>
where &'a X: Unpin, Snapshot<<X as Xml>::Document, <X as Xml>::Generation>: Unpin, <X as Xml>::Id: Unpin, OwnedVec<Part<<X as Xml>::Id>>: Unpin,

§

impl<'a, X> UnsafeUnpin for Input<'a, X>
where &'a X: UnsafeUnpin, Snapshot<<X as Xml>::Document, <X as Xml>::Generation>: UnsafeUnpin, <X as Xml>::Id: UnsafeUnpin, OwnedVec<Part<<X as Xml>::Id>>: UnsafeUnpin,

§

impl<'a, X> UnwindSafe for Input<'a, X>
where &'a X: UnwindSafe, Snapshot<<X as Xml>::Document, <X as Xml>::Generation>: UnwindSafe, <X as Xml>::Id: UnwindSafe, OwnedVec<Part<<X as Xml>::Id>>: 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.