alpm_types

Type Alias BuildEnvironmentOption

Source
pub type BuildEnvironmentOption = MakepkgOption;
Expand description

An option string used in a build environment

The option string is identified by its name and whether it is on (not prefixed with “!”) or off (prefixed with “!”). This type is an alias for MakepkgOption.

§Examples

use alpm_types::BuildEnvironmentOption;

let option = BuildEnvironmentOption::new("foo")?;
assert_eq!(option.on(), true);
assert_eq!(option.name(), "foo");

let not_option = BuildEnvironmentOption::new("!foo")?;
assert_eq!(not_option.on(), false);
assert_eq!(not_option.name(), "foo");

Aliased Type§

struct BuildEnvironmentOption {
    name: String,
    on: bool,
}

Fields§

§name: String§on: bool