[][src]Struct ar::Builder

pub struct Builder<W: Write> { /* fields omitted */ }

A structure for building Common or BSD-variant archives (the archive format typically used on e.g. BSD and Mac OS X systems).

This structure has methods for building up an archive from scratch into any arbitrary writer.

Methods

impl<W: Write> Builder<W>[src]

pub fn new(writer: W) -> Builder<W>[src]

Create a new archive builder with the underlying writer object as the destination of all data written.

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> Unpin for Builder<W> where
    W: Unpin

impl<W> Sync for Builder<W> where
    W: Sync

impl<W> Send for Builder<W> where
    W: Send

impl<W> UnwindSafe for Builder<W> where
    W: UnwindSafe

impl<W> RefUnwindSafe for Builder<W> where
    W: RefUnwindSafe

Blanket Implementations

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

impl<T> From<T> for 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]