Struct cargo_deb::manifest::Config

source ·
#[non_exhaustive]
pub struct Config {
Show 39 fields pub package_manifest_dir: PathBuf, pub deb_output_path: Option<String>, pub target: Option<String>, pub target_dir: PathBuf, pub name: String, pub deb_name: String, pub deb_version: String, pub license: Option<String>, pub license_file: Option<PathBuf>, pub license_file_skip_lines: usize, pub copyright: String, pub changelog: Option<String>, pub homepage: Option<String>, pub documentation: Option<String>, pub repository: Option<String>, pub description: String, pub extended_description: Option<String>, pub maintainer: String, pub depends: String, pub pre_depends: Option<String>, pub recommends: Option<String>, pub suggests: Option<String>, pub enhances: Option<String>, pub section: Option<String>, pub priority: String, pub conflicts: Option<String>, pub breaks: Option<String>, pub replaces: Option<String>, pub provides: Option<String>, pub architecture: String, pub conf_files: Option<String>, pub triggers_file: Option<PathBuf>, pub maintainer_scripts: Option<PathBuf>, pub features: Vec<String>, pub default_features: bool, pub debug_enabled: bool, pub separate_debug_symbols: bool, pub preserve_symlinks: bool, pub default_timestamp: u64, /* private fields */
}
Expand description

Cargo deb configuration read from the manifest and cargo metadata

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§package_manifest_dir: PathBuf

Directory where Cargo.toml is located. It’s a subdirectory in workspaces.

§deb_output_path: Option<String>

User-configured output path for *.deb

§target: Option<String>

Triple. None means current machine architecture.

§target_dir: PathBuf

CARGO_TARGET_DIR

§name: String

The name of the project to build

§deb_name: String

The name to give the Debian package; usually the same as the Cargo project name

§deb_version: String

The version to give the Debian package; usually the same as the Cargo version

§license: Option<String>

The software license of the project (SPDX format).

§license_file: Option<PathBuf>

The location of the license file

§license_file_skip_lines: usize

number of lines to skip when reading license_file

§copyright: String

The copyright of the project (Debian’s copyright file contents).

§changelog: Option<String>§homepage: Option<String>

The homepage URL of the project.

§documentation: Option<String>

Documentation URL from Cargo.toml. Fallback if homepage is missing.

§repository: Option<String>

The URL of the software repository.

§description: String

A short description of the project.

§extended_description: Option<String>

An extended description of the project.

§maintainer: String

The maintainer of the Debian package. In Debian control file Maintainer field format.

§depends: String

The Debian dependencies required to run the project.

§pre_depends: Option<String>

The Debian pre-dependencies.

§recommends: Option<String>

The Debian recommended dependencies.

§suggests: Option<String>

The Debian suggested dependencies.

§enhances: Option<String>

The list of packages this package can enhance.

§section: Option<String>

The Debian software category to which the package belongs.

§priority: String

The Debian priority of the project. Typically ‘optional’.

§conflicts: Option<String>

Conflicts Debian control field.

See PackageTransition.

§breaks: Option<String>

Breaks Debian control field.

See PackageTransition.

§replaces: Option<String>

Replaces Debian control field.

See PackageTransition.

§provides: Option<String>

Provides Debian control field.

See PackageTransition.

§architecture: String

The Debian architecture of the target system.

§conf_files: Option<String>

A list of configuration files installed by the package.

§triggers_file: Option<PathBuf>

The location of the triggers file

§maintainer_scripts: Option<PathBuf>

The path where possible maintainer scripts live

§features: Vec<String>

List of Cargo features to use during build

§default_features: bool§debug_enabled: bool

Should the binary be stripped from debug symbols?

§separate_debug_symbols: bool

Should the debug symbols be moved to a separate file included in the package? (implies strip:true)

§preserve_symlinks: bool

Should symlinks be preserved in the assets

§default_timestamp: u64

unix timestamp for generated files

Implementations§

source§

impl Config

source

pub fn from_manifest( manifest_path: &Path, selected_package_name: Option<&str>, output_path: Option<String>, target: Option<&str>, variant: Option<&str>, deb_version: Option<String>, deb_revision: Option<String>, listener: &dyn Listener, selected_profile: &str ) -> CDResult<Config>

Makes a new config from Cargo.toml in the manifest_path

None target means the host machine’s architecture.

source

pub fn extend_cargo_build_flags(&self, flags: &mut Vec<String>)

source

pub fn resolve_assets(&mut self) -> CDResult<()>

source

pub fn add_debug_assets(&mut self, original_binaries: Vec<Asset>)

Trait Implementations§

source§

impl Debug for Config

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

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

§

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>,

§

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.