Skip to main content

Archive

Struct Archive 

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

Complete original central-directory census. Names occupy one pooled buffer; entry order is never replaced by a map’s unique-name interpretation.

Implementations§

Source§

impl<'s, S: RangeSource> Archive<'s, S>

Source

pub fn ltv_query<'q, 'v, W: Work>(&'v self, work: &'q W) -> Query<'q, 'v, 's, S>
where 'v: 'q,

Borrows this actual source with no allocation or account clone.

Source§

impl<'s, S: RangeSource> Archive<'s, S>

Source

pub async fn read<W: Work>( source: &'s S, session: &'s Session, work: &W, ) -> Result<Self, Error<S::Error>>

Reads original ZIP/ZIP64 metadata under source AND current execution. No payload is inflated and no filesystem path is acquired.

Source

pub fn stamp(&self) -> Stamp<S::Document, S::Generation>

Immutable source metadata captured before directory acquisition.

Source

pub fn len(&self) -> usize

Number of original occurrences, including duplicates and invalid entries.

Source

pub fn is_empty(&self) -> bool

Whether the original directory contains no members.

Source

pub fn comment_span(&self) -> Span

Original archive comment bytes, distinct from a filename/MIME hint.

Source

pub fn directory_span(&self) -> Span

Original directory enclosure.

Source

pub fn member<W: Work>( &self, ordinal: usize, work: &W, ) -> Result<Option<Member<'_, 's, S>>, Error<S::Error>>

Selects by original ordinal after current/source admission. No lookup chooses one copy of a duplicated name or drops malformed occurrences.

Source

pub fn original<W: Work>( &self, id: MemberId<S::Document, S::Generation>, work: &W, ) -> Result<Member<'_, 's, S>, Error<S::Error>>

Selects an existing ID only within its exact original source view.

Source

pub fn faults<'v, 'q, W: Work>( &'v self, work: &'q W, ) -> SourceResult<impl Iterator<Item = Result<Fault, Error<S::Error>>> + use<'v, 'q, 's, S, W>, S>

Visits every negative fact in original discovery order under this query. Refusal is returned once and permanently fuses traversal.

Source

pub fn find<W: Work>( &self, name: &[u8], work: &W, ) -> Result<Names<'_, 's, S>, Error<S::Error>>

Exact original-name lookup. The result keeps the complete duplicate range; no Unicode/case normalization or filesystem interpretation occurs.

Auto Trait Implementations§

§

impl<'s, S> !Freeze for Archive<'s, S>

§

impl<'s, S> !RefUnwindSafe for Archive<'s, S>

§

impl<'s, S> !Send for Archive<'s, S>

§

impl<'s, S> !Sync for Archive<'s, S>

§

impl<'s, S> !UnwindSafe for Archive<'s, S>

§

impl<'s, S> Forget for Archive<'s, S>

§

impl<'s, S> Unpin for Archive<'s, S>

§

impl<'s, S> UnsafeUnpin for Archive<'s, S>

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.