[][src]Struct quickcfg::Template

pub struct Template { /* fields omitted */ }

A loaded template string.

Methods

impl Template[src]

pub fn parse(input: &str) -> Result<Template, Error>[src]

Parse a template string, with variables delimited with {var}.

pub fn as_relative_path(
    &self,
    vars: impl Vars,
    environment: impl Environment
) -> Result<Option<RelativePathBuf>, Error>
[src]

Render as a relative path buffer.

pub fn as_path(
    &self,
    root: &Path,
    base_dirs: Option<&BaseDirs>,
    vars: impl Vars,
    environment: impl Environment
) -> Result<Option<PathBuf>, Error>
[src]

Render as a path.

pub fn as_string(
    &self,
    vars: impl Vars,
    environment: impl Environment
) -> Result<Option<String>, Error>
[src]

Simplified to render as string.

Trait Implementations

impl Debug for Template[src]

impl<'de> Deserialize<'de> for Template[src]

impl Display for Template[src]

impl Eq for Template[src]

impl PartialEq<Template> for Template[src]

impl StructuralEq for Template[src]

impl StructuralPartialEq for Template[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.