pub fn files_with_io(mut self, files: &mut [(&str, &mut dyn Read, u64)]) -> Self {
        let mut tarball = Vec::new();
        {
            let mut ar = tar::Builder::new(GzEncoder::new(&mut tarball, Compression::default()));
            for &mut (name, ref mut data, size) in files {
                let mut header = tar::Header::new_gnu();
                t!(header.set_path(name));
                header.set_size(size);
                header.set_cksum();
                t!(ar.append(&header, data));
            }
            t!(ar.finish());
        }

        self.tarball = tarball;
        self
    }
/// Set the tarball from a Read trait object
Set the tarball from a Read trait object
Set the tarball from a Read trait object
pub fn files_with_io(mut self, files: &mut [(&str, &mut dyn Read, u64)]) -> Self {
        let mut tarball = Vec::new();
        {
            let mut ar = tar::Builder::new(GzEncoder::new(&mut tarball, Compression::default()));
            for &mut (name, ref mut data, size) in files {
                let mut header = tar::Header::new_gnu();
                t!(header.set_path(name));
                header.set_size(size);
                header.set_cksum();
                t!(ar.append(&header, data));
            }
            t!(ar.finish());
        }
        self.tarball = tarball;
        self
    }
pub fn files_with_io ( mut self , files : & mut [ ( & str , & mut dyn Read , u64 ) ] ) -> Self { let mut tarball = Vec :: new ( ) ; { let mut ar = tar :: Builder :: new ( GzEncoder :: new ( & mut tarball , Compression :: default ( ) ) ) ; for & mut ( name , ref mut data , size ) in files { let mut header = tar :: Header :: new_gnu ( ) ; t ! ( header set_path ( name ) ) ; header . set_size ( size ) ; header . set_cksum ( ) ; t ! ( ar append ( header data ) ) ; } t ! ( ar finish ( ) ) ; } self . tarball = tarball ; self }
Set the tarball from a Read trait object
Set the tarball from a Read trait object
mut self
files
&mut [(&str, &mut dyn Read, u64)]