[−][src]Struct ar::Builder
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,
W: Unpin,
impl<W> Sync for Builder<W> where
W: Sync,
W: Sync,
impl<W> Send for Builder<W> where
W: Send,
W: Send,
impl<W> UnwindSafe for Builder<W> where
W: UnwindSafe,
W: UnwindSafe,
impl<W> RefUnwindSafe for Builder<W> where
W: RefUnwindSafe,
W: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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.
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,