[−][src]Enum wix::Template
The different templates that can be printed or written to a file.
Variants
Apache2The Apache-2.0 license.
Gpl3The GPL-3.0 license.
MitThe MIT license.
WxsA WiX Source (wxs) file.
Methods
impl Template[src]
pub fn id(&self) -> &str[src]
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"); }
pub fn possible_values() -> Vec<String>[src]
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" ] ); }
pub fn license_ids() -> Vec<String>[src]
Gets the IDs of all supported licenses.
Examples
extern crate wix; use wix::Template; fn main() { assert_eq!( Template::license_ids(), vec![ "Apache-2.0", "GPL-3.0", "MIT", ] ); }
pub fn to_str(&self) -> &str[src]
Gets the embedded contents of the template as a string.
Trait Implementations
impl Copy for Template[src]
impl PartialEq<Template> for Template[src]
fn eq(&self, other: &Template) -> bool[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.
impl Clone for Template[src]
fn clone(&self) -> Template[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Display for Template[src]
impl Debug for Template[src]
impl FromStr for Template[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,