[−][src]Struct ar::GnuBuilder
A structure for building GNU-variant archives (the archive format typically used on e.g. GNU/Linux and Windows systems).
This structure has methods for building up an archive from scratch into any arbitrary writer.
Methods
impl<W: Write> GnuBuilder<W>
[src]
pub fn new(writer: W, identifiers: Vec<Vec<u8>>) -> GnuBuilder<W>
[src]
Create a new archive builder with the underlying writer object as the
destination of all data written. The identifiers
parameter must give
the complete list of entry identifiers that will be included in this
archive.
pub fn into_inner(self) -> Result<W>
[src]
Unwrap this archive builder, returning the underlying writer object.
pub fn append<R: Read>(&mut self, header: &Header, data: R) -> Result<()>
[src]
Adds a new entry to this archive.
pub fn append_path<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
[src]
Adds a file on the local filesystem to this archive, using the file name as its identifier.
pub fn append_file(&mut self, name: &[u8], file: &mut File) -> Result<()>
[src]
Adds a file to this archive, with the given name as its identifier.
Auto Trait Implementations
impl<W> Send for GnuBuilder<W> where
W: Send,
W: Send,
impl<W> Unpin for GnuBuilder<W> where
W: Unpin,
W: Unpin,
impl<W> Sync for GnuBuilder<W> where
W: Sync,
W: Sync,
impl<W> UnwindSafe for GnuBuilder<W> where
W: UnwindSafe,
W: UnwindSafe,
impl<W> RefUnwindSafe for GnuBuilder<W> where
W: RefUnwindSafe,
W: RefUnwindSafe,
Blanket Implementations
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,