pub struct GlobalConfig {
pub staging: StagingPath,
pub method: SyncMethod,
pub subgroup_prefix: SubgroupPrefix,
pub allow_overwrite: AllowOverwrite,
pub ignore_failure: IgnoreFailure,
pub renderable: Renderable,
pub hostname_sep: HostnameSeparator,
pub rename: RenamingRules,
}Expand description
Configures default behaviours.
Fields§
§staging: StagingPathThe staging root directory.
Only works when method (see below) is set to Symlink. When
syncing with Symlink method, items will be copied to their
staging directory (composed by joining staging root
directory with their group name), then symlinked (as of ln -sf)
from their staging directory to the target directory.
Default to $XDG_DATA_HOME/dt/staging if XDG_DATA_HOME is set,
or $HOME/.cache/dt/staging if HOME is set. Panics when
neither XDG_DATA_HOME nor HOME is set and config file does
not specify this.
method: SyncMethodThe syncing method.
Available values are:
When method is Copy, the above staging setting will be
disabled.
subgroup_prefix: SubgroupPrefixA string to be prepended to a subgroup’s name when creating its
staging directory with the Symlink syncing method.
allow_overwrite: AllowOverwriteWhether to allow overwriting existing files.
This alters syncing behaviours when the target file exists. If set
to true, no errors/warnings will be omitted when the target
file exists; otherwise reports error and skips the existing item.
Using dry run to spot the existing files before syncing is
recommended.
ignore_failure: IgnoreFailureWhether to treat errors omitted during syncing as warnings. It has a per-group counterpart to set per-group behaviours. Note that errors occurred before or after syncing are NOT affected.
renderable: RenderableWhether to enable templating. It has a per-group counterpart to set if a group is to be rendered.
hostname_sep: HostnameSeparatorThe hostname separator.
Specifies default value when Group::hostname_sep is not set.
rename: RenamingRulesGlobal item renaming rules.
Rules defined here will be prepended to renaming rules of each group.
See Group::rename.
Trait Implementations§
Source§impl Clone for GlobalConfig
impl Clone for GlobalConfig
Source§fn clone(&self) -> GlobalConfig
fn clone(&self) -> GlobalConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more