[][src]Struct broot::conf::Conf

pub struct Conf {
    pub files: Vec<PathBuf>,
    pub default_flags: Option<String>,
    pub date_time_format: Option<String>,
    pub verbs: Vec<VerbConf>,
    pub skin: Option<FnvHashMap<String, SkinEntry>>,
    pub special_paths: FnvHashMap<Glob, SpecialHandling>,
    pub search_modes: Option<FnvHashMap<String, String>>,
    pub disable_mouse_capture: Option<bool>,
    pub cols_order: Option<ColsConf>,
    pub show_selection_mark: Option<bool>,
    pub ext_colors: FnvHashMap<String, String>,
    pub syntax_theme: Option<String>,
    pub true_colors: Option<bool>,
    pub icon_theme: Option<String>,
    pub modal: Option<bool>,
}

The configuration read from conf.toml file(s)

Fields

files: Vec<PathBuf>

the files used to load this configuration

default_flags: Option<String>date_time_format: Option<String>verbs: Vec<VerbConf>skin: Option<FnvHashMap<String, SkinEntry>>special_paths: FnvHashMap<Glob, SpecialHandling>search_modes: Option<FnvHashMap<String, String>>disable_mouse_capture: Option<bool>cols_order: Option<ColsConf>show_selection_mark: Option<bool>ext_colors: FnvHashMap<String, String>syntax_theme: Option<String>true_colors: Option<bool>icon_theme: Option<String>modal: Option<bool>

Implementations

impl Conf[src]

pub fn default_location() -> PathBuf[src]

return the path to the default conf.toml file. If there's no conf.hjson file in the default conf directory, and if there's a toml file, return this toml file.

pub fn from_default_location() -> Result<Conf, ProgramError>[src]

read the configuration file from the default OS specific location. Create it if it doesn't exist

pub fn write_sample(filepath: &Path) -> Result<(), Error>[src]

assume the file doesn't yet exist

pub fn read_file(&mut self, path: PathBuf) -> Result<(), ProgramError>[src]

read the configuration from a given path. Assume it exists. Values set in the read file replace the ones of self. Errors are printed on stderr (assuming this function is called before terminal alternation).

Trait Implementations

impl Clone for Conf[src]

impl Debug for Conf[src]

impl Default for Conf[src]

impl<'de> Deserialize<'de> for Conf[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,