[][src]Struct goblin::archive::Member

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]

pub fn parse(buffer: &'a [u8], offset: &mut usize) -> Result<Member<'a>>[src]

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]

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]

The member name, accounting for SysV and BSD ar filename extensions

pub fn raw_name(&self) -> &'a str[src]

The untrimmed raw member name, i.e., includes right-aligned space padding and '/' end-of-string identifier

Trait Implementations

impl<'a> PartialEq<Member<'a>> for Member<'a>[src]

impl<'a> Clone for Member<'a>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'a> Debug for Member<'a>[src]

Auto Trait Implementations

impl<'a> Unpin for Member<'a>

impl<'a> Sync for Member<'a>

impl<'a> Send for Member<'a>

impl<'a> RefUnwindSafe for Member<'a>

impl<'a> UnwindSafe for Member<'a>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]