pub struct TarEncoder<W> { /* private fields */ }Expand description
A pure-pax format writer for use with ArchiveBuilder::builder.
Implementations§
Source§impl<W> TarEncoder<W>
impl<W> TarEncoder<W>
Sourcepub fn new(writer: W) -> Self
pub fn new(writer: W) -> Self
Creates an encoder writing an uncompressed pax archive into writer.
Sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Returns the underlying writer without finalizing the archive.
Use archive_trait::Builder::finish_into_inner first to recover the
writer from a completed archive.
Trait Implementations§
Source§impl<W: AsyncWrite + Unpin> ArchiveBuilder for TarEncoder<W>
impl<W: AsyncWrite + Unpin> ArchiveBuilder for TarEncoder<W>
Source§type Error = EncodeError
type Error = EncodeError
The archive-format error returned while encoding entries.
Source§async fn finish_archive(&mut self) -> Result<(), BuildFailure<Self::Error>>
async fn finish_archive(&mut self) -> Result<(), BuildFailure<Self::Error>>
Writes any format-specific archive terminator or index.
Source§async fn write_file_member(
&mut self,
path: &str,
payload: &mut FilePayload<'_>,
metadata: EntryMetadata,
) -> Result<(), BuildFailure<Self::Error>>
async fn write_file_member( &mut self, path: &str, payload: &mut FilePayload<'_>, metadata: EntryMetadata, ) -> Result<(), BuildFailure<Self::Error>>
Writes one regular-file member and its complete payload. Read more
Source§async fn write_directory_member(
&mut self,
path: &str,
) -> Result<(), BuildFailure<Self::Error>>
async fn write_directory_member( &mut self, path: &str, ) -> Result<(), BuildFailure<Self::Error>>
Writes one directory member.
Source§async fn write_symbolic_link_member(
&mut self,
path: &str,
target: &str,
) -> Result<(), BuildFailure<Self::Error>>
async fn write_symbolic_link_member( &mut self, path: &str, target: &str, ) -> Result<(), BuildFailure<Self::Error>>
Writes one symbolic-link member.
Auto Trait Implementations§
impl<W> Freeze for TarEncoder<W>where
W: Freeze,
impl<W> RefUnwindSafe for TarEncoder<W>where
W: RefUnwindSafe,
impl<W> Send for TarEncoder<W>where
W: Send,
impl<W> Sync for TarEncoder<W>where
W: Sync,
impl<W> Unpin for TarEncoder<W>where
W: Unpin,
impl<W> UnsafeUnpin for TarEncoder<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for TarEncoder<W>where
W: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more