pub enum Template {
Apache2,
Gpl3,
Mit,
Wxs,
}
Expand description
The different templates that can be printed or written to a file.
Variants§
Apache2
The Apache-2.0 license.
Gpl3
The GPL-3.0 license.
Mit
The MIT license.
Wxs
A WiX Source (wxs) file.
Implementations§
source§impl Template
impl Template
sourcepub fn id(&self) -> &str
pub fn id(&self) -> &str
Gets the ID for the template.
In the case of a license template, the ID is the SPDX ID which is also used for the
license
field in the package’s manifest (Cargo.toml). This is also the same value used
with the cargo wix print
subcommand.
Examples
extern crate wix;
use wix::Template;
fn main() {
assert_eq!(Template::Apache2.id(), "Apache-2.0");
assert_eq!(Template::Gpl3.id(), "GPL-3.0");
assert_eq!(Template::Mit.id(), "MIT");
assert_eq!(Template::Wxs.id(), "WXS");
}
sourcepub fn possible_values() -> Vec<String> ⓘ
pub fn possible_values() -> Vec<String> ⓘ
Gets the possible string representations of each variant.
The possibilities are combination of case (upper and lower) for the various templates that are available.
Examples
extern crate wix;
use wix::Template;
fn main() {
assert_eq!(
Template::possible_values(),
vec![
"Apache-2.0",
"apache-2.0",
"GPL-3.0",
"gpl-3.0",
"MIT",
"mit",
"WXS",
"wxs"
]
);
}