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
Implementations
Trait Implementations
Source§impl Clone for MakepkgOption
impl Clone for MakepkgOption
Source§fn clone(&self) -> MakepkgOption
fn clone(&self) -> MakepkgOption
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MakepkgOption
impl Debug for MakepkgOption
Source§impl<'de> Deserialize<'de> for MakepkgOption
impl<'de> Deserialize<'de> for MakepkgOption
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>,
Deserialize this value from the given Serde deserializer. Read more