pub fn serialize(self) -> Result<raw::header::Raw, BasicTarError> {
		// Create and populate the header
		let mut tar = raw::header::header();
		self.path.into_field(&mut tar.name)?;
		
		self.mode.into_octal_field(&mut tar.mode)?;
		self.uid.into_octal_field(&mut tar.uid)?;
		self.gid.into_octal_field(&mut tar.gid)?;
		
		self.size.into_octal_field(&mut tar.size)?;
		self.mtime.into_octal_field(&mut tar.mtime)?;
		
		tar.typeflag[0] = self.typeflag;
		self.linkname.into_field(&mut tar.linkname)?;
		
		// Write the checksum and return the header
		Checksum::write(&mut tar);
		Ok(tar.into())
	}
/// Serializes the tar header into a raw byte block
///
/// _Note: this function can fail because the struct may contain values that cannot be
/// serialized, e.g. a name longer than 100 bytes or a size greater than 8 GiB_
Serializes the tar header into a raw byte block
_Note: this function can fail because the struct may contain values that cannot be
serialized, e.g. a name longer than 100 bytes or a size greater than 8 GiB_
Serializes the tar header into a raw byte block _Note : this function can fail because the struct may contain values that cannot be serialized e . g . a name longer than 100 bytes or a size greater than 8 GiB_
pub fn serialize(self) -> Result<raw::header::Raw, BasicTarError> {
		// Create and populate the header
		let mut tar = raw::header::header();
		self.path.into_field(&mut tar.name)?;
		self.mode.into_octal_field(&mut tar.mode)?;
		self.uid.into_octal_field(&mut tar.uid)?;
		self.gid.into_octal_field(&mut tar.gid)?;
		self.size.into_octal_field(&mut tar.size)?;
		self.mtime.into_octal_field(&mut tar.mtime)?;
		tar.typeflag[0] = self.typeflag;
		self.linkname.into_field(&mut tar.linkname)?;
		// Write the checksum and return the header
		Checksum::write(&mut tar);
		Ok(tar.into())
	}
pub fn serialize ( self ) -> Result < raw :: header :: Raw , BasicTarError > { // Create and populate the header let mut tar = raw :: header :: header ( ) ; self . path . into_field ( & mut tar . name ) ? ; self . mode . into_octal_field ( & mut tar . mode ) ? ; self . uid . into_octal_field ( & mut tar . uid ) ? ; self . gid . into_octal_field ( & mut tar . gid ) ? ; self . size . into_octal_field ( & mut tar . size ) ? ; self . mtime . into_octal_field ( & mut tar . mtime ) ? ; tar . typeflag [ 0 ] = self . typeflag ; self . linkname . into_field ( & mut tar . linkname ) ? ; // Write the checksum and return the header Checksum :: write ( & mut tar ) ; Ok ( tar . into ( ) ) }
Serializes the tar header into a raw byte block
_Note: this function can fail because the struct may contain values that cannot be
serialized, e.g.
Serializes the tar header into a raw byte block _Note : this function can fail because the struct may contain values that cannot be serialized e . g .
self
self