pub struct ArchiveMember<'data> { /* private fields */ }
Expand description

A partially parsed archive member.

Implementations§

source§

impl<'data> ArchiveMember<'data>

source

pub fn header(&self) -> Option<&'data Header>

Return the raw header that is common to many archive formats.

Returns None if this archive does not use the common header format.

source

pub fn aix_header(&self) -> Option<&'data AixHeader>

Return the raw header for AIX big archives.

Returns None if this is not an AIX big archive.

source

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

Return the parsed file name.

This may be an extended file name.

source

pub fn date(&self) -> Option<u64>

Parse the file modification timestamp from the header.

source

pub fn uid(&self) -> Option<u64>

Parse the user ID from the header.

source

pub fn gid(&self) -> Option<u64>

Parse the group ID from the header.

source

pub fn mode(&self) -> Option<u64>

Parse the file mode from the header.

source

pub fn file_range(&self) -> (u64, u64)

Return the offset and size of the file data.

source

pub fn data<R: ReadRef<'data>>(&self, data: R) -> Result<&'data [u8]>

Return the file data.

Trait Implementations§

source§

impl<'data> Debug for ArchiveMember<'data>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'data> RefUnwindSafe for ArchiveMember<'data>

§

impl<'data> Send for ArchiveMember<'data>

§

impl<'data> Sync for ArchiveMember<'data>

§

impl<'data> Unpin for ArchiveMember<'data>

§

impl<'data> UnwindSafe for ArchiveMember<'data>

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>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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.