Skip to main content

Member

Struct Member 

Source
pub struct Member<'view, 'source, S: RangeSource> { /* private fields */ }
Expand description

A selected original occurrence; construction checks its immutable archive.

Implementations§

Source§

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

Source

pub async fn content<W: Work>( &self, work: &W, ) -> Result<Content<'v, 's, S>, ReadFailure<S::Error, S::Document, S::Generation>>

Acquires exactly this original occurrence through complete EOF/CRC. Signed data objects can instead use source without retention.

Source§

impl<S: RangeSource> Member<'_, '_, S>

Source

pub async fn read_media<W: Work>( &self, work: &W, ) -> Result<Reading<S::Document, S::Generation>, ReadFailure<S::Error, S::Document, S::Generation>>

Streams the original full member through the existing incremental MIME grammar. There is no joined media-type buffer, new parser or replay. A malformed MIME reading still requires complete ZIP integrity.

Source§

impl<'v, 's, S: RangeSource> Member<'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>>>

Complete EOF/CRC acquisition followed by the same owning signature path.

Source§

impl<'v, 's, S: RangeSource> Member<'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>>>

Acquires exactly this original member, validates EOF/CRC and moves its funded allocation to the selected XML owner. The association is minted only around that actual owner’s scoped view. Cancellation drops all driver-owned temporary storage; external visitor effects are not rolled back. No successful partial result is returned after a late refusal.

Source§

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

Source

pub fn source<W: Work>(&self, work: &W) -> Acquisition<Source<'v, 's, S>, S>

Checks source, method and unambiguous framing before constructing a payload source. CRC and final extent remain complete-EOF obligations.

Source

pub async fn read_bytes<W: Work>( &self, work: &W, ) -> Result<OwnedVec<u8>, ReadFailure<S::Error, S::Document, S::Generation>>

Retains a complete carried CMS/XML member under actual-capacity funding. Large data objects should be streamed; no successful prefix is returned after source, CRC, decoded-length or receiver refusal.

§Panics

An internal framing invariant fails if a preflighted readable member lacks its already checked original payload range.

Source§

impl<S: RangeSource> Member<'_, '_, S>

Source

pub fn id(&self) -> MemberId<S::Document, S::Generation>

Immutable identity of this original occurrence.

Source

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

Untouched original filename bytes, including invalid UTF-8.

Source

pub fn central_span(&self) -> Span

Original central-directory enclosure.

Source

pub fn name_span(&self) -> Span

Original physical filename enclosure.

Source

pub fn method(&self) -> u16

Original declared compression method.

Source

pub fn flags(&self) -> u16

Original ZIP general-purpose flags.

Source

pub fn version_needed(&self) -> u16

Original required extraction version.

Source

pub fn data_span(&self) -> Option<Span>

Original compressed payload extent, if it can be bounded unambiguously.

Source

pub fn local_span(&self) -> Option<Span>

Original complete local record, including its actual descriptor.

Source

pub fn local_extra_span(&self) -> Option<Span>

Original local-header extra fields, independently of central extras.

Source

pub fn decoded_length(&self) -> u64

Declared decoded length. Successful acquisition independently checks it.

Trait Implementations§

Source§

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

Source§

type Source<'q> = Source<'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<'view, 'source, S> !RefUnwindSafe for Member<'view, 'source, S>

§

impl<'view, 'source, S> !Send for Member<'view, 'source, S>

§

impl<'view, 'source, S> !Sync for Member<'view, 'source, S>

§

impl<'view, 'source, S> !UnwindSafe for Member<'view, 'source, S>

§

impl<'view, 'source, S> Forget for Member<'view, 'source, S>

§

impl<'view, 'source, S> Freeze for Member<'view, 'source, S>
where &'view Archive<'source, S>: Freeze,

§

impl<'view, 'source, S> Unpin for Member<'view, 'source, S>
where &'view Archive<'source, S>: Unpin,

§

impl<'view, 'source, S> UnsafeUnpin for Member<'view, 'source, S>
where &'view Archive<'source, 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.