Struct tar_no_std::TarArchive
source · 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 type, that owns the data on the heap. The provided byte array is interpreted as bytes in Tar archive format.
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
source§fn eq(&self, other: &TarArchive) -> bool
fn eq(&self, other: &TarArchive) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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