Struct goblin::archive::Member [−][src]
pub struct Member<'a> { pub header: Header<'a>, pub header_offset: u64, pub offset: u64, // some fields omitted }
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
Methods
impl<'a> Member<'a>
[src]
impl<'a> Member<'a>
pub fn parse(buffer: &'a [u8], offset: &mut usize) -> Result<Member<'a>>
[src]
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.
pub fn size(&self) -> usize
[src]
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.
pub fn extended_name(&self) -> &'a str
[src]
pub fn extended_name(&self) -> &'a str
The member name, accounting for SysV and BSD ar
filename extensions
pub fn raw_name(&self) -> &'a str
[src]
pub fn raw_name(&self) -> &'a str
The untrimmed raw member name, i.e., includes right-aligned space padding and '/'
end-of-string
identifier
Trait Implementations
impl<'a> Debug for Member<'a>
[src]
impl<'a> Debug for Member<'a>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a> Clone for Member<'a>
[src]
impl<'a> Clone for Member<'a>
fn clone(&self) -> Member<'a>
[src]
fn clone(&self) -> Member<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'a> PartialEq for Member<'a>
[src]
impl<'a> PartialEq for Member<'a>