alpm_types

Type Alias PackageOption

source
pub type PackageOption = MakePkgOption;
Expand description

An option string used in packaging

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::PackageOption;

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

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

Aliased Type§

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

Fields§

§name: String§on: bool