pub struct Config {
pub base_path: Option<PathBuf>,
pub variables: HashMap<String, String>,
pub path_overrides: HashMap<String, PathBuf>,
}
Expand description
Runtime configuration.
Fields§
§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.