Struct goblin::archive::Member [−][src]
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
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> Clone for Member<'a>
[src]
impl<'a> Debug for Member<'a>
[src]
impl<'a> PartialEq<Member<'a>> for Member<'a>
[src]
impl<'a> StructuralPartialEq for Member<'a>
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,