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>
impl<'s, S: RangeSource> Archive<'s, S>
Source§impl<'s, S: RangeSource> Archive<'s, S>
impl<'s, S: RangeSource> Archive<'s, S>
Sourcepub async fn read<W: Work>(
source: &'s S,
session: &'s Session,
work: &W,
) -> Result<Self, Error<S::Error>>
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.
Sourcepub fn stamp(&self) -> Stamp<S::Document, S::Generation>
pub fn stamp(&self) -> Stamp<S::Document, S::Generation>
Immutable source metadata captured before directory acquisition.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Number of original occurrences, including duplicates and invalid entries.
Sourcepub fn comment_span(&self) -> Span
pub fn comment_span(&self) -> Span
Original archive comment bytes, distinct from a filename/MIME hint.
Sourcepub fn directory_span(&self) -> Span
pub fn directory_span(&self) -> Span
Original directory enclosure.
Sourcepub fn member<W: Work>(
&self,
ordinal: usize,
work: &W,
) -> Result<Option<Member<'_, 's, S>>, Error<S::Error>>
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.
Sourcepub fn original<W: Work>(
&self,
id: MemberId<S::Document, S::Generation>,
work: &W,
) -> Result<Member<'_, 's, S>, Error<S::Error>>
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.
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>where
&'s S: UnsafeUnpin,
Stamp<<S as RangeSource>::Document, <S as RangeSource>::Generation>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more