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
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
use wix::Template;
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");
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
use wix::Template;
assert_eq!(
Template::possible_values(),
vec![
"Apache-2.0",
"apache-2.0",
"GPL-3.0",
"gpl-3.0",
"MIT",
"mit",
"WXS",
"wxs"
]
);
Gets the IDs of all supported licenses.
Examples
use wix::Template;
assert_eq!(
Template::license_ids(),
vec![
"Apache-2.0",
"GPL-3.0",
"MIT",
]
);
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Template
impl UnwindSafe for Template
Blanket Implementations
Mutably borrows from an owned value. Read more