Struct tugger_debian::ControlTarBuilder [−][src]
pub struct ControlTarBuilder<'a> { /* fields omitted */ }A builder for a control.tar file inside .deb packages.
Implementations
impl<'a> ControlTarBuilder<'a>[src]
impl<'a> ControlTarBuilder<'a>[src]pub fn new(control_file: ControlFile<'a>) -> Self[src]
Create a new instance from a control file.
pub fn add_extra_file(
self,
path: impl AsRef<Path>,
entry: impl Into<FileEntry>
) -> Result<Self, DebError>[src]
self,
path: impl AsRef<Path>,
entry: impl Into<FileEntry>
) -> Result<Self, DebError>
Add an extra file to the control archive.
This is usually used to add maintainer scripts. Maintainer scripts
are special scripts like preinst and postrm that are executed
during certain activities.
pub fn add_data_file<P: AsRef<Path>, R: Read>(
self,
path: P,
reader: &mut R
) -> Result<Self, DebError>[src]
self,
path: P,
reader: &mut R
) -> Result<Self, DebError>
Add a data file to be indexed.
This should be called for every file in the corresponding data.tar
archive in the .deb archive.
path is the relative path the file will be installed to.
reader is a reader to obtain the file content.
This method has the side-effect of computing the checksum for the path so a checksums entry can be written.
pub fn set_mtime(self, time: Option<SystemTime>) -> Self[src]
pub fn write<W: Write>(&self, writer: &mut W) -> Result<(), DebError>[src]
Write the control.tar file to a writer.
Auto Trait Implementations
impl<'a> RefUnwindSafe for ControlTarBuilder<'a>
impl<'a> RefUnwindSafe for ControlTarBuilder<'a>impl<'a> Send for ControlTarBuilder<'a>
impl<'a> Send for ControlTarBuilder<'a>impl<'a> Sync for ControlTarBuilder<'a>
impl<'a> Sync for ControlTarBuilder<'a>impl<'a> Unpin for ControlTarBuilder<'a>
impl<'a> Unpin for ControlTarBuilder<'a>impl<'a> UnwindSafe for ControlTarBuilder<'a>
impl<'a> UnwindSafe for ControlTarBuilder<'a>