[−][src]Enum wix::Template
The different templates that can be printed or written to a file.
Variants
The Apache-2.0 license.
The GPL-3.0 license.
The MIT license.
A WiX Source (wxs) file.
Implementations
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 Clone for Template
[src]
impl Copy for Template
[src]
impl Debug for Template
[src]
impl Display for Template
[src]
impl FromStr for Template
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl PartialEq<Template> for Template
[src]
impl StructuralPartialEq for Template
[src]
Auto Trait Implementations
impl RefUnwindSafe for Template
impl Send for Template
impl Sync for Template
impl Unpin for Template
impl UnwindSafe for Template
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,