Skip to main content

Pool

Struct Pool 

Source
pub struct Pool<'prepared, 'model, 'document> { /* private fields */ }
Expand description

Complete original source pool. Every readable timestamp envelope is held once; CRL/OCSP models are parsed once, and index creation never replays them.

Implementations§

Source§

impl<'p, 'm, 'd> Pool<'p, 'm, 'd>

Source

pub fn read( prepared: &'p Preparation<'m, 'd>, operation: &Reader<'d>, ) -> Result<Self>

Read the entire original source pool, preserving unreadable token and known material findings. Resource/depth/processing refusal is terminal, releases partial models and never returns a successful partial pool.

Source

pub fn prepared(&self) -> &'p Preparation<'m, 'd>

Same source preparation; the pool cannot be relabelled to another root.

Source

pub fn token_faults(&self) -> &[(Node, ReadError)]

Every unreadable original timestamp and its retained failure.

Source

pub fn open(&self) -> &[Open<'d>]

Every original unknown or known-malformed material enclosure.

Source

pub fn crls(&self) -> usize

Number of original readable complete/delta CRL values, without parsing.

Source

pub fn crl<W: Work>( &self, ordinal: usize, work: &W, ) -> Result<Option<&CertificateList<'d>>>

One original parsed CRL under current metadata admission. Authentication and status processing reuse this model; they must not reparse its bytes.

Source

pub fn ocsp_responses(&self) -> usize

Number of original readable basic responses in their real wire format.

Source

pub fn ocsp<W: Work>( &self, ordinal: usize, work: &W, ) -> Result<Option<&BasicResponse<'d>>>

One first-read basic response, from a whole RFC5940 envelope or actual Annex A revocation-values. The index retains its real placement.

Source

pub fn token<W: Work>( &self, ordinal: usize, work: &W, ) -> Result<Option<&Token<'d>>>

Original timestamp envelopes, indexed by original preparation ordinal. This paid query reuses the parsed envelope rather than reparsing it.

Source

pub fn with_token<R, E>( &self, ordinal: usize, operation: &Reader<'d>, visitor: impl for<'scope> FnOnce(Context<'scope, 'm, 'd>) -> Result<R, E>, ) -> Result<R, VisitError<E>>

Visit a previously parsed original token with the current operation. Uses its saved parser/encoding/depth, with no second envelope parse.

Source

pub fn index_for_archive<'source, Q>( &'source self, archive: ArchiveView<'_, 'm, 'd, '_>, query: &Q, ) -> Result<Index<'source, 'm, 'd, Q::Work>, ArchiveIndexError>
where Q: Query<Id = Node, Document = DocumentId<'m, 'd>, Generation = ()>, 'd: 'source,

Build material scope for the actual successful archive owner, including a historical counter or parallel root. Sources are the same original pool; no signature is replayed and no parsed artifact is cloned.

Source

pub fn index<'source, Q>( &'source self, query: &Q, ) -> Result<Index<'source, 'm, 'd, Q::Work>, IndexError<Node>>
where Q: Query<Id = Node, Document = DocumentId<'m, 'd>, Generation = ()>, 'd: 'source,

Build the one exact-artifact index from actual root/token locations. Models remain borrowed; no certificate/CRL/status byte copy or parser replay occurs. The current query funds all new hashing/probing/storage.

Auto Trait Implementations§

§

impl<'prepared, 'model, 'document> !Freeze for Pool<'prepared, 'model, 'document>

§

impl<'prepared, 'model, 'document> !RefUnwindSafe for Pool<'prepared, 'model, 'document>

§

impl<'prepared, 'model, 'document> !Send for Pool<'prepared, 'model, 'document>

§

impl<'prepared, 'model, 'document> !Sync for Pool<'prepared, 'model, 'document>

§

impl<'prepared, 'model, 'document> !UnwindSafe for Pool<'prepared, 'model, 'document>

§

impl<'prepared, 'model, 'document> Unpin for Pool<'prepared, 'model, 'document>

§

impl<'prepared, 'model, 'document> UnsafeUnpin for Pool<'prepared, 'model, 'document>

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.