Skip to main content

Content

Struct Content 

Source
pub struct Content<'v, 's, S: RangeSource> { /* private fields */ }
Expand description

Independent storage for one complete original decoded member. Its ASN.1 cursor always inherits the archive’s producing session and current query; neither moving storage nor reopening a cursor resets cumulative work.

Implementations§

Source§

impl<'v, 's, S: RangeSource> Content<'v, 's, S>

Source

pub async fn check_assertion_actor<'c, 'd, P, PE, RE>( &'d self, token: &'d Token<'d>, parent: &Reader<'d>, provider: &'d P, context: &CheckContext<'d, 'c>, input: &impl Payload<'v, 's, S>, kind: InputKind, recognizes: impl FnMut(&TokenExtension<'_>, &Execution<'_>) -> Result<bool, RE>, ) -> ActorResult<'c, 'd, 'v, 's, S, PE, RE>
where P: for<'scope> SignatureProvider<'scope, Error = PE>,

Checks one actual historical assertion over an original complete input. The role selects data versus archive-input mathematics, not container conformance. Only the source-derived graph can mint archive coverage.

Source§

impl<'v, 's, S: RangeSource> Content<'v, 's, S>

Source

pub async fn check_cades<'a, P: SignatureProvider<'a>>( &'a self, challenge: Challenge<'a, P>, payload: &impl Payload<'v, 's, S>, ) -> Result<Checks<'a, 'v, 's, S>, Error<S::Error, P::Error, S::Document, S::Generation>>

Validates both member/session identities and payload framing BEFORE initializing provider states, then drives the existing CMS batch with the sealed original member stream. Negative signer answers are retained.

Source§

impl<'v, 's, S: RangeSource> Content<'v, 's, S>

Source

pub fn member(&self) -> &Member<'v, 's, S>

Exact original central-directory occurrence that supplied these bytes.

Source

pub fn bytes(&self) -> &[u8] ⓘ

Complete decoded bytes, without copying or treating them as physical offsets.

Source

pub fn enclosure(&self) -> Span

Physical original local record, including any descriptor.

§Panics

Only if the private complete-content construction invariant is broken: complete CRC-checked bytes always have a validated local enclosure.

Source

pub fn read<'q, W: Work + 'q>( &'q self, work: &W, ) -> ResultOf<(SignedData<'q>, Reader<'q>), S>

Inspects the original carried CMS without a replacement parser or copy.

Source

pub fn read_timestamp<'q, W: Work + 'q>( &'q self, work: &W, ) -> ResultOf<(Token<'q>, Reader<'q>), S>

Uses the existing complete RFC3161 envelope reader on this source.

Source

pub fn read_evidence<'q, W: Work + 'q>( &'q self, work: &W, ) -> ResultOf<(EvidenceRecord<'q>, Reader<'q>), S>

Uses the shared RFC4998 grammar for one entire original member.

Source§

impl<'v, 's, S: RangeSource> Content<'v, 's, S>

Source

pub async fn check_manifest_evidence<'a, 'c, X, P, PE, A, RE, HE, FE>( &'a self, record: &'a EvidenceRecord<'a>, parent: &Reader<'a>, provider: &'a P, authorities: &'a A, utc: &LeapTable<'a>, reference: Instant, catalogue: &'c Catalogue<'v, 's, X::Id, X::Document, X::Generation, S>, xml: &X, recognizes: impl FnMut(usize, &TokenExtension<'_>, &Execution<'_>) -> Result<bool, RE>, historical: impl FnMut(Historical<'_, 'a>, &Execution<'_>) -> Result<Decision, HE>, profile: impl for<'view, 'scope> FnMut(usize, ProfileInput<'view, 'a, 'a, 'scope>) -> Result<(), ProfileFailure<FE>>, ) -> Result<Option<ManifestChecked<'a, 'c, 'v, 's, X::Id, X::Document, X::Generation, S>>, ManifestError<ArchiveError<S::Error>, VerificationError<ManifestInputError<ReadFailure<<S as RangeSource>::Error, <S as RangeSource>::Document, <S as RangeSource>::Generation>, Error<<X as Xml>::Error, Error<Infallible, PE>, <X as Xml>::Id, <X as Xml>::Document, <X as Xml>::Generation>, <X as Xml>::Id>, PE, RE, A::Error, HE, FE>, AccessError<X::Error, X::Id>>>
where X: OwnedBinaryXml, P: for<'scope> SignatureProvider<'scope, Error = PE> + for<'scope> DigestProvider<'scope, X>, A: Authorities<'a>,

Verifies the exact referenced member group and its declared XML hashes through one all-chain digest pass per original object. A negative URI group returns None with its full inspection catalogue left available; it never becomes a successful subset. An unrelated record is caller misuse. Original XML source provenance is a separate producing boundary.

Source§

impl<'v, 's, S: RangeSource> Content<'v, 's, S>

Source

pub async fn check_evidence<'a, P, PE, A, RE, HE, FE>( &'a self, record: &'a EvidenceRecord<'a>, parent: &Reader<'a>, provider: &'a P, authorities: &'a A, utc: &LeapTable<'a>, reference: Instant, objects: Group<'v, 's, S>, membership: Membership, recognizes: impl FnMut(usize, &TokenExtension<'_>, &Execution<'_>) -> Result<bool, RE>, historical: impl FnMut(Historical<'_, 'a>, &Execution<'_>) -> Result<Decision, HE>, profile: impl for<'view, 'scope> FnMut(usize, ProfileInput<'view, 'a, 'a, 'scope>) -> Result<(), ProfileFailure<FE>>, ) -> Result<Checked<'a, 'a, 'v, 's, S>, Error<S::Error, PE, RE, A::Error, HE, FE, S::Document, S::Generation>>
where P: for<'scope> SignatureProvider<'scope, Error = PE>, A: Authorities<'a>,

Checks all original record participants, both renewal relations and chronology with the ONE shared ERS kernel. The original object group is preflighted before states and streamed once for all chain algorithms.

Source§

impl<'v, 's, S: RangeSource> Content<'v, 's, S>

Source

pub fn material<'a>( &'a self, message: &'a SignedData<'a>, parent: &Reader<'a>, ) -> Result<Pool<'a, 'v, 's, S>, Error<S::Error>>

Reads every original certificate/revocation choice and every signer’s validation values through the existing CMS/CAdES kernels. This applies to carried TST SignedData without asserting that it is a CAdES signature.

§Panics

An internal CMS invariant fails if its retained revocation catalogue cannot supply a reader for an ordinal taken from that same catalogue.

Source§

impl<'v, 's, S: RangeSource> Content<'v, 's, S>

Source

pub async fn check_timestamp<'a, P, PE, RE>( &'a self, token: &'a Token<'a>, parent: &Reader<'a>, provider: &'a P, context: Context<'_, 'a, '_>, input: &impl Payload<'v, 's, S>, recognizes: impl FnMut(&TokenExtension<'_>, &Execution<'_>) -> Result<bool, RE>, ) -> Result<Checked<'a, S::Document, S::Generation>, Error<S::Error, PE, RE, S::Document, S::Generation>>
where P: for<'scope> SignatureProvider<'scope, Error = PE>,

Requires the actual carried token/source first, then invokes the shared full asynchronous timestamp validator on the sealed original payload. Candidate/key/time/extension recognition stay caller-provided contracts.

Source§

impl<'v, 's, S: RangeSource> Content<'v, 's, S>

Source

pub async fn with_signed_xml<F: SignatureFactory<'v, 's, S>, V: SignatureVisitor<'v, 's, F, S>, W: Work>( self, factory: &F, visitor: V, work: &W, ) -> Result<V::Output, Error<ReadFailure<S::Error, S::Document, S::Generation>, F::Error, V::Error, AccessError<F::Error, F::Id>>>

Moves the actual complete original member into owning XML verification, then keeps its view/state/source/current operation alive through await. No separately parsed snapshot can be attached to this source receipt.

Source§

impl<'v, 's, S: RangeSource> Content<'v, 's, S>

Source

pub async fn with_xml<F: Factory, V: Visitor<'v, 's, F, S>, W: Work>( self, factory: &F, visitor: V, work: &W, ) -> Result<V::Output, Error<ReadFailure<S::Error, S::Document, S::Generation>, F::Error, V::Error, AccessError<F::Error, F::Id>>>

Moves the already complete allocation into XML production. Raw manifest signatures/time assertions can consume this same retained input first, avoiding a second ZIP acquisition, decode, CRC pass or buffer copy.

Trait Implementations§

Source§

impl<'v, 's, S: RangeSource> Payload<'v, 's, S> for Content<'v, 's, S>

Source§

type Source<'q> = Retained<'q, 'v, 's, S>
where Self: 'q,

Exact original acquisition or retained-input stream.
Source§

fn member(&self) -> &Member<'v, 's, S>

Original complete member identity and producing execution.
Source§

fn source<W: Work>( &self, work: &W, ) -> Result<Self::Source<'_>, ReadFailure<S::Error, S::Document, S::Generation>>

Preflights the actual source before provider state creation.

Auto Trait Implementations§

§

impl<'v, 's, S> !Freeze for Content<'v, 's, S>

§

impl<'v, 's, S> !RefUnwindSafe for Content<'v, 's, S>

§

impl<'v, 's, S> !Send for Content<'v, 's, S>

§

impl<'v, 's, S> !Sync for Content<'v, 's, S>

§

impl<'v, 's, S> !UnwindSafe for Content<'v, 's, S>

§

impl<'v, 's, S> Unpin for Content<'v, 's, S>
where Member<'v, 's, S>: Unpin,

§

impl<'v, 's, S> UnsafeUnpin for Content<'v, 's, S>
where Member<'v, 's, S>: 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.