[][src]Struct reinda::Config

pub struct Config {
    pub base_path: Option<PathBuf>,
    pub variables: HashMap<String, String>,
    pub path_overrides: HashMap<String, PathBuf>,

Runtime configuration.


base_path: Option<PathBuf>

The base path from which all non-embedded assets are loaded. Default: None.

The per-asset paths you defined in the asset! invocation are prepended by this path. This path can be absolute or relative. If this is not defined, the base path set in assets! is used.

variables: HashMap<String, String>

Key-value map for template variables. Default: empty.

These can be inserted into assets via {{: var:foo :}}.

path_overrides: HashMap<String, PathBuf>

A list of path overrides for specific non-embedded assets. The key is the asset path you specified in assets! and the value is a path to that specific asset. This override is then used instead of self.base_path.join(asset_path). If the override is a relative path, it's relative to the current working directory.

Trait Implementations

impl Clone for Config[src]

impl Debug for Config[src]

impl Default for Config[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.