pub struct Member<'a> {
pub header: Header<'a>,
pub header_offset: u64,
pub offset: u64,
/* private fields */
}
Expand description
Represents a single entry in the archive
Fields§
§header: Header<'a>
The entry header
header_offset: u64
File offset from the start of the archive to where the header begins
offset: u64
File offset from the start of the archive to where the file begins
Implementations§
source§impl<'a> Member<'a>
impl<'a> Member<'a>
sourcepub fn parse(buffer: &'a [u8], offset: &mut usize) -> Result<Member<'a>>
pub fn parse(buffer: &'a [u8], offset: &mut usize) -> Result<Member<'a>>
Tries to parse the header in R
, as well as the offset in `R.
NOTE the Seek will be pointing at the first byte of whatever the file is, skipping padding.
This is because just like members in the archive, the data section is 2-byte aligned.
sourcepub fn size(&self) -> usize
pub fn size(&self) -> usize
The size of the Member’s content, in bytes. Does not include newline padding, nor the size of the file header.
sourcepub fn extended_name(&self) -> &'a str
pub fn extended_name(&self) -> &'a str
The member name, accounting for SysV and BSD ar
filename extensions
Trait Implementations§
source§impl<'a> PartialEq for Member<'a>
impl<'a> PartialEq for Member<'a>
impl<'a> StructuralPartialEq for Member<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Member<'a>
impl<'a> Send for Member<'a>
impl<'a> Sync for Member<'a>
impl<'a> Unpin for Member<'a>
impl<'a> UnwindSafe for Member<'a>
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