pub enum BuildEnvironmentOption {
BuildFlags(bool),
Ccache(bool),
Check(bool),
Color(bool),
Distcc(bool),
Sign(bool),
MakeFlags(bool),
}
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 “!”).
See the makepkg.conf manpage for more information.
§Examples
use alpm_types::BuildEnvironmentOption;
let option = BuildEnvironmentOption::new("distcc")?;
assert_eq!(option.on(), true);
assert_eq!(option.name(), "distcc");
let not_option = BuildEnvironmentOption::new("!ccache")?;
assert_eq!(not_option.on(), false);
assert_eq!(not_option.name(), "ccache");
Variants§
BuildFlags(bool)
Use or unset the values of build flags (e.g. CPPFLAGS
, CFLAGS
, CXXFLAGS
, LDFLAGS
)
specified in user-specific configs (e.g. makepkg.conf).
Ccache(bool)
Use ccache to cache compilation
Check(bool)
Run the check() function if present in the PKGBUILD
Color(bool)
Colorize output messages
Distcc(bool)
Use the Distributed C/C++/ObjC compiler
Sign(bool)
Generate PGP signature file
MakeFlags(bool)
Use or unset the value of the MAKEFLAGS
environment variable specified in
user-specific configs (e.g. makepkg.conf).
Implementations§
Source§impl BuildEnvironmentOption
impl BuildEnvironmentOption
const VARIANTS: [&str; 7]
Sourcepub fn new(option: &str) -> Result<Self, Error>
pub fn new(option: &str) -> Result<Self, Error>
Create a new BuildEnvironmentOption
in a Result
§Errors
An error is returned if the string slice does not match a valid build environment option.
Sourcepub fn parser(input: &mut &str) -> ModalResult<Self>
pub fn parser(input: &mut &str) -> ModalResult<Self>
Recognizes a BuildEnvironmentOption
in a string slice.
Consumes all of its input.
§Errors
Returns an error if input
is not a valid build environment option.
Trait Implementations§
Source§impl Clone for BuildEnvironmentOption
impl Clone for BuildEnvironmentOption
Source§fn clone(&self) -> BuildEnvironmentOption
fn clone(&self) -> BuildEnvironmentOption
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for BuildEnvironmentOption
impl Debug for BuildEnvironmentOption
Source§impl<'de> Deserialize<'de> for BuildEnvironmentOption
impl<'de> Deserialize<'de> for BuildEnvironmentOption
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for BuildEnvironmentOption
impl Display for BuildEnvironmentOption
Source§impl FromStr for BuildEnvironmentOption
impl FromStr for BuildEnvironmentOption
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Creates a BuildEnvironmentOption
from a string slice.
Delegates to BuildEnvironmentOption::parser
.
§Errors
Returns an error if BuildEnvironmentOption::parser
fails.