Struct debian_packaging::deb::builder::ControlTarBuilder
source · [−]pub struct ControlTarBuilder<'a> { /* private fields */ }Expand description
A builder for a control.tar file inside .deb packages.
Implementations
sourceimpl<'a> ControlTarBuilder<'a>
impl<'a> ControlTarBuilder<'a>
sourcepub fn new(control_file: ControlFile<'a>) -> Self
pub fn new(control_file: ControlFile<'a>) -> Self
Create a new instance from a control file.
sourcepub fn add_extra_file(
self,
path: impl AsRef<Path>,
entry: impl Into<FileEntry>
) -> Result<Self>
pub fn add_extra_file(
self,
path: impl AsRef<Path>,
entry: impl Into<FileEntry>
) -> Result<Self>
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.
sourcepub fn add_data_file<P: AsRef<Path>, R: Read>(
self,
path: P,
reader: &mut R
) -> Result<Self>
pub fn add_data_file<P: AsRef<Path>, R: Read>(
self,
path: P,
reader: &mut R
) -> Result<Self>
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
Auto Trait Implementations
impl<'a> RefUnwindSafe for ControlTarBuilder<'a>
impl<'a> Send for ControlTarBuilder<'a>
impl<'a> Sync for ControlTarBuilder<'a>
impl<'a> Unpin for ControlTarBuilder<'a>
impl<'a> UnwindSafe for ControlTarBuilder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more