Struct object::read::archive::ArchiveMember
source · pub struct ArchiveMember<'data> {
header: MemberHeader<'data>,
name: &'data [u8],
offset: u64,
size: u64,
}
Expand description
A partially parsed archive member.
Fields§
§header: MemberHeader<'data>
§name: &'data [u8]
§offset: u64
§size: u64
Implementations§
source§impl<'data> ArchiveMember<'data>
impl<'data> ArchiveMember<'data>
sourcefn parse<R: ReadRef<'data>>(
data: R,
offset: &mut u64,
names: &'data [u8],
thin: bool,
) -> Result<Self>
fn parse<R: ReadRef<'data>>( data: R, offset: &mut u64, names: &'data [u8], thin: bool, ) -> Result<Self>
Parse the member header, name, and file data in an archive with the common format.
This reads the extended name (if any) and adjusts the file size.
sourcefn parse_aixbig_index<R: ReadRef<'data>>(
data: R,
index: &AixMemberOffset,
) -> Result<Self>
fn parse_aixbig_index<R: ReadRef<'data>>( data: R, index: &AixMemberOffset, ) -> Result<Self>
Parse a member index entry in an AIX big archive, and then parse the member header, name, and file data.
sourcefn parse_aixbig<R: ReadRef<'data>>(data: R, offset: u64) -> Result<Self>
fn parse_aixbig<R: ReadRef<'data>>(data: R, offset: u64) -> Result<Self>
Parse the member header, name, and file data in an AIX big archive.
sourcepub fn header(&self) -> Option<&'data Header>
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.
sourcepub fn aix_header(&self) -> Option<&'data AixHeader>
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.
sourcepub fn name(&self) -> &'data [u8] ⓘ
pub fn name(&self) -> &'data [u8] ⓘ
Return the parsed file name.
This may be an extended file name.
sourcepub fn file_range(&self) -> (u64, u64)
pub fn file_range(&self) -> (u64, u64)
Return the offset and size of the file data.
Trait Implementations§
Auto Trait Implementations§
impl<'data> Freeze for ArchiveMember<'data>
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> 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