pub struct TarArchive { /* private fields */ }
Expand description
Type that owns bytes on the heap, that represents a Tar archive.
Unlike TarArchiveRef
, this type takes ownership of the data.
This is only available with the alloc
feature of this crate.
Implementations§
Source§impl TarArchive
impl TarArchive
Sourcepub fn new(data: Box<[u8]>) -> Result<Self, CorruptDataError>
pub fn new(data: Box<[u8]>) -> Result<Self, CorruptDataError>
Creates a new archive wrapper type. The provided byte array is interpreted as bytes in Tar archive format.
Returns an error, if the sanity checks report problems.
Sourcepub fn entries(&self) -> ArchiveEntryIterator<'_> ⓘ
pub fn entries(&self) -> ArchiveEntryIterator<'_> ⓘ
Iterates over all entries of the Tar archive.
Returns items of type ArchiveEntry
.
See also ArchiveEntryIterator
.
Trait Implementations§
Source§impl Clone for TarArchive
impl Clone for TarArchive
Source§fn clone(&self) -> TarArchive
fn clone(&self) -> TarArchive
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TarArchive
impl Debug for TarArchive
Source§impl From<TarArchive> for Box<[u8]>
impl From<TarArchive> for Box<[u8]>
Source§fn from(ar: TarArchive) -> Self
fn from(ar: TarArchive) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TarArchive
impl PartialEq for TarArchive
impl Eq for TarArchive
impl StructuralPartialEq for TarArchive
Auto Trait Implementations§
impl Freeze for TarArchive
impl RefUnwindSafe for TarArchive
impl Send for TarArchive
impl Sync for TarArchive
impl Unpin for TarArchive
impl UnwindSafe for TarArchive
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