#[non_exhaustive]pub struct BuildEnvironment {
pub package_manifest_dir: PathBuf,
pub cargo_run_current_dir: PathBuf,
pub target_dir_base: PathBuf,
pub build_dir_base: Option<PathBuf>,
pub features: Vec<String>,
pub default_features: bool,
pub all_features: bool,
pub debug_symbols: DebugSymbols,
pub reproducible: bool,
/* 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: PathBufDirectory where Cargo.toml is located. It’s a subdirectory in workspaces.
cargo_run_current_dir: PathBufRun cargo commands from this dir, or things may subtly break
target_dir_base: PathBufCARGO_TARGET_DIR, without target?/profile
build_dir_base: Option<PathBuf>Either derived from target_dir or -Zbuild-dir
features: Vec<String>List of Cargo features to use during build
default_features: bool§all_features: bool§debug_symbols: DebugSymbolsShould the binary be stripped from debug symbols?
reproducible: booltry to be deterministic
Implementations§
Source§impl BuildEnvironment
impl BuildEnvironment
Sourcepub fn from_manifest(
_: BuildOptions<'_>,
listener: &dyn Listener,
) -> CDResult<(Self, Vec<PackageConfig>)>
pub fn from_manifest( _: BuildOptions<'_>, listener: &dyn Listener, ) -> CDResult<(Self, Vec<PackageConfig>)>
Makes a new config from Cargo.toml in the manifest_path
None target means the host machine’s architecture.
pub fn set_cargo_build_flags_for_packages( &self, package_debs: &[PackageConfig], cmd: &mut Command, )
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BuildEnvironment
impl RefUnwindSafe for BuildEnvironment
impl Send for BuildEnvironment
impl Sync for BuildEnvironment
impl Unpin for BuildEnvironment
impl UnwindSafe for BuildEnvironment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more