Struct Config
#[non_exhaustive]pub struct Config {Show 31 fields
pub root_dir: String,
pub db_path: String,
pub cache_dir: Vec<String>,
pub hook_dir: Vec<String>,
pub gpg_dir: String,
pub log_file: String,
pub hold_pkg: Vec<String>,
pub ignore_pkg: Vec<String>,
pub ignore_group: Vec<String>,
pub architecture: Vec<String>,
pub xfer_command: String,
pub no_upgrade: Vec<String>,
pub no_extract: Vec<String>,
pub clean_method: Vec<String>,
pub sig_level: Vec<String>,
pub local_file_sig_level: Vec<String>,
pub remote_file_sig_level: Vec<String>,
pub download_user: Option<String>,
pub use_syslog: bool,
pub color: bool,
pub use_delta: f64,
pub total_download: bool,
pub check_space: bool,
pub verbose_pkg_lists: bool,
pub disable_download_timeout: bool,
pub parallel_downloads: u64,
pub disable_sandbox: bool,
pub disable_sandbox_filesystem: bool,
pub disable_sandbox_syscalls: bool,
pub chomp: bool,
pub repos: Vec<Repository>,
}Expand description
A pacman config.
See pacman.conf (5) for information on each field.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.root_dir: StringRootDir
db_path: StringDBPath
cache_dir: Vec<String>CacheDir
hook_dir: Vec<String>HookDir
gpg_dir: StringGPGDir
log_file: StringLogFile
hold_pkg: Vec<String>HoldPkg
ignore_pkg: Vec<String>IgnorePkg
ignore_group: Vec<String>IgnoreGroup
architecture: Vec<String>Architecture
xfer_command: StringXferCommand
no_upgrade: Vec<String>NoUpgrade
no_extract: Vec<String>NoExtract
clean_method: Vec<String>CleanMethod
sig_level: Vec<String>SigLevel
local_file_sig_level: Vec<String>LocalFileSigLevel
remote_file_sig_level: Vec<String>RemoteFileSigLevel
download_user: Option<String>DownloadUser
use_syslog: boolUseSyslog
color: boolColor
use_delta: f64UseDelta
total_download: boolTotalDownload
check_space: boolCheckSpace
verbose_pkg_lists: boolVerpsePkgLists
disable_download_timeout: boolDisableDownloadTimeout
parallel_downloads: u64ParallelDownloads
disable_sandbox: boolDisableSandbox
disable_sandbox_filesystem: boolDisableSandboxFilesystem
disable_sandbox_syscalls: boolDisableSandboxSyscalls
chomp: boolILoveCandy
repos: Vec<Repository>[repo_name]
Implementations§
§impl Config
impl Config
pub fn new() -> Result<Config, Error>
pub fn new() -> Result<Config, Error>
Creates a new Config from the default pacman.conf.
The default pacman.conf location is a compile time option of pacman but is usually located at /etc/pacman.conf.
pub fn empty() -> Result<Config, Error>
pub fn empty() -> Result<Config, Error>
Creates a new Config using pacman’s compiled in defaults.
Parsing an empty file causes pacman-conf to fill in each
field with pacman’s compiled in default values. This should
not be confused with the Default::default() function which
is derived and will give rust’s default values eg:
empty string, 0, etc.