Struct goblin::archive::Archive [−][src]
An in-memory representation of a parsed Unix Archive
Implementations
impl<'a> Archive<'a>
[src]
pub fn parse(buffer: &'a [u8]) -> Result<Archive<'a>>
[src]
pub fn get(&self, member: &str) -> Option<&Member<'_>>
[src]
Get the member named member
in this archive, if any. If there are
multiple files in the archive with the same name it only returns one
of them.
pub fn get_at(&self, index: usize) -> Option<&Member<'_>>
[src]
Get the member at position index
in this archive, if any.
pub fn len(&self) -> usize
[src]
Return the number of archive members.
pub fn extract<'b>(&self, member: &str, buffer: &'b [u8]) -> Result<&'b [u8]>
[src]
Returns a slice of the raw bytes for the given member
in the scrollable buffer
pub fn summarize(&self) -> Vec<(&str, &Member<'_>, Vec<&'a str>)>
[src]
Gets a summary of this archive, returning a list of membername, the member, and the list of symbols the member contains
pub fn members(&self) -> Vec<&'a str>
[src]
Get the list of member names in this archive
This returns members in alphabetical order, not in the order they
occurred in the archive. If there are multiple files with the same
name, the size of the returned array will be less than the size of
len()
.
pub fn member_of_symbol(&self, symbol: &str) -> Option<&'a str>
[src]
Returns the member’s name which contains the given symbol
, if it is in the archive
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Archive<'a>
impl<'a> Send for Archive<'a>
impl<'a> Sync for Archive<'a>
impl<'a> Unpin for Archive<'a>
impl<'a> UnwindSafe for Archive<'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, 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>,