pub struct TarStreamSink { /* private fields */ }Expand description
Sink that streams a tar archive (optionally codec-wrapped) to a
Write. Hard links are materialised (tar copies the body).
Implementations§
Source§impl TarStreamSink
impl TarStreamSink
Trait Implementations§
Source§impl RepackSink for TarStreamSink
impl RepackSink for TarStreamSink
fn put_dir( &mut self, path: &str, meta: RepackMeta, xattrs: &[XattrPair], ) -> Result<()>
fn put_file( &mut self, path: &str, body: &mut dyn Read, len: u64, meta: RepackMeta, xattrs: &[XattrPair], ) -> Result<()>
fn put_symlink( &mut self, path: &str, target: &str, meta: RepackMeta, xattrs: &[XattrPair], ) -> Result<()>
fn put_device( &mut self, path: &str, kind: DeviceKind, major: u32, minor: u32, meta: RepackMeta, xattrs: &[XattrPair], ) -> Result<()>
Source§fn put_hardlink(
&mut self,
_path: &str,
_target: &str,
_meta: RepackMeta,
_xattrs: &[XattrPair],
) -> Result<bool>
fn put_hardlink( &mut self, _path: &str, _target: &str, _meta: RepackMeta, _xattrs: &[XattrPair], ) -> Result<bool>
Create
path as a hard link to the already-emitted target.
Returns Ok(false) when the sink can’t represent hard links —
the walker then materialises the body with a fresh Self::put_file.Source§fn finish(&mut self) -> Result<()>
fn finish(&mut self) -> Result<()>
Finalise the destination (flush / write the archive trailer).
Source§fn materialise_copy(
&mut self,
_path: &str,
_target: &str,
_meta: RepackMeta,
_xattrs: &[XattrPair],
) -> Result<()>
fn materialise_copy( &mut self, _path: &str, _target: &str, _meta: RepackMeta, _xattrs: &[XattrPair], ) -> Result<()>
Materialise
path as an independent copy of the already-written
target. Used by the streaming tar walker when put_hardlink
returns false (the destination can’t represent a hard link)
and the source body has already streamed past — so the copy is
sourced from the destination, not the source. Default errors;
only FsSink implements it.Auto Trait Implementations§
impl !RefUnwindSafe for TarStreamSink
impl !Send for TarStreamSink
impl !Sync for TarStreamSink
impl !UnwindSafe for TarStreamSink
impl Freeze for TarStreamSink
impl Unpin for TarStreamSink
impl UnsafeUnpin for TarStreamSink
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