pub struct Config {
Show 27 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 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 chomp: bool, pub repos: Vec<Repository>,
}
Expand description

A pacman config.

See pacman.conf (5) for information on each field.

Fields

root_dir: String

RootDir

db_path: String

DBPath

cache_dir: Vec<String>

CacheDir

hook_dir: Vec<String>

HookDir

gpg_dir: String

GPGDir

log_file: String

LogFile

hold_pkg: Vec<String>

HoldPkg

ignore_pkg: Vec<String>

IgnorePkg

ignore_group: Vec<String>

IgnoreGroup

architecture: Vec<String>

Architecture

xfer_command: String

XferCommand

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

use_syslog: bool

UseSyslog

color: bool

Color

use_delta: f64

UseDelta

total_download: bool

TotalDownload

check_space: bool

CheckSpace

verbose_pkg_lists: bool

VerpsePkgLists

disable_download_timeout: bool

DisableDownloadTimeout

parallel_downloads: u64

ParallelDownloads

chomp: bool

ILoveCandy

repos: Vec<Repository>

[repo_name]

Implementations

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.

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.

Create a new Config from a file.

Create a new Config with options.

  • bin: The location of the pacman-conf binary. Default is pacman-conf in PATH.
  • config: Location of config file to parse: Default is pacman’s compiled in default (usually /etc/pacman.conf). root_dir: The RootDir: Default is pacman’s compiled in default (usually /).

Expand the pacman_conf

This generates a pacman.conf with all the Includes expanded

  • bin: The location of the pacman-conf binary. Default is pacman-conf in PATH.
  • config: Location of config file to parse: Default is pacman’s compiled in default (usually /etc/pacman.conf). root_dir: The RootDir: Default is pacman’s compiled in default (usually /).

Expand the pacman_conf

This generates a pacman.conf with all the Includes expanded

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

The associated error which can be returned from parsing.

The callback function that is called for every line parsed.

Parses an ini str into a struct. Read more

Parses an ini str into a struct. Optionally a filename can be supplied, this is passed to the callback so that error messages can contain the filename. Read more

Like parse() but allows you to input the starting section as well as returning the section the input data leaves on. Read more

Parses a single line of an ini str.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.