DebBuilder

Struct DebBuilder 

Source
pub struct DebBuilder<'control> { /* private fields */ }
Expand description

A builder for a .deb package file.

Implementations§

Source§

impl<'control> DebBuilder<'control>

Source

pub fn new(control_file: ControlFile<'control>) -> Self

Construct a new instance using a control file.

Source

pub fn set_compression(self, compression: DebCompression) -> Self

Set the compression format to use.

Not all compression formats are supported by all Linux distributions.

Source

pub fn set_mtime(self, time: Option<SystemTime>) -> Self

Set the modified time to use on archive members.

If this is called, all archive members will use the specified time, helping to make archive content deterministic.

If not called, the current time will be used.

Source

pub fn extra_control_tar_file( self, path: impl AsRef<Path>, entry: impl Into<FileEntry>, ) -> Result<Self, DebError>

Add an extra file to the control.tar archive.

Source

pub fn install_file( self, path: impl AsRef<Path> + Clone, entry: impl Into<FileEntry> + Clone, ) -> Result<Self, DebError>

Register a file as to be installed by this package.

Filenames should be relative to the filesystem root. e.g. usr/bin/myapp.

The file content will be added to the data.tar archive and registered with the control.tar archive so its checksum is computed.

Source

pub fn write<W: Write>(&self, writer: &mut W) -> Result<(), DebError>

Write .deb file content to a writer.

This effectively materialized the .deb package somewhere.

Auto Trait Implementations§

§

impl<'control> Freeze for DebBuilder<'control>

§

impl<'control> RefUnwindSafe for DebBuilder<'control>

§

impl<'control> Send for DebBuilder<'control>

§

impl<'control> Sync for DebBuilder<'control>

§

impl<'control> Unpin for DebBuilder<'control>

§

impl<'control> UnwindSafe for DebBuilder<'control>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.