pub struct TarStream<R> { /* private fields */ }Expand description
A strict stream of POSIX-pax or GNU frames sourced from an underlying reader.
Implementations§
Source§impl<R> TarStream<R>
impl<R> TarStream<R>
Sourcepub fn with_policy(self, policy: StreamPolicy) -> Self
pub fn with_policy(self, policy: StreamPolicy) -> Self
Configures the framing policy used by this stream.
Call before reading any frames.
Sourcepub fn format(&self) -> Option<ArchiveFormat>
pub fn format(&self) -> Option<ArchiveFormat>
Returns the selected archive family after the first header is read.
Source§impl<R: AsyncRead + Unpin> TarStream<R>
impl<R: AsyncRead + Unpin> TarStream<R>
Sourcepub async fn next_frame(&mut self) -> Result<Option<Frame>, FrameError>
pub async fn next_frame(&mut self) -> Result<Option<Frame>, FrameError>
Returns the next non-terminator physical archive frame.
Reaching the end of the archive returns None after applying the
configured TrailingDataPolicy. A framing error fuses
this reader, so every subsequent call also returns None. Cancelling
this operation retains any partial block for the next call.
Auto Trait Implementations§
impl<R> Forget for TarStream<R>
impl<R> Freeze for TarStream<R>where
R: Freeze,
*const u8 is !null: Freeze,
PhantomData<PaxRecord>: Freeze,
PhantomData<(PaxKeyword, usize)>: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<PaxRecords> is !null: Freeze,
PhantomData<ArcInner<PaxRecords>>: Freeze,
impl<R> Move for TarStream<R>
impl<R> RefUnwindSafe for TarStream<R>
impl<R> Send for TarStream<R>
impl<R> Sync for TarStream<R>
impl<R> Unpin for TarStream<R>
impl<R> UnsafeUnpin for TarStream<R>where
R: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<PaxRecord>: UnsafeUnpin,
PhantomData<(PaxKeyword, usize)>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<PaxRecords> is !null: UnsafeUnpin,
PhantomData<ArcInner<PaxRecords>>: UnsafeUnpin,
impl<R> UnwindSafe for TarStream<R>where
R: UnwindSafe,
RawVecInner: UnwindSafe,
Arc<str>: UnwindSafe,
Arc<[u8]>: UnwindSafe,
HashMap<PaxKeyword, usize>: UnwindSafe,
Arc<PaxRecords>: UnwindSafe,
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