Struct broot::conf::Conf

source ·
pub struct Conf {
Show 23 fields pub files: Vec<PathBuf>, pub default_flags: Option<String>, pub date_time_format: Option<String>, pub verbs: Vec<VerbConf>, pub skin: Option<AHashMap<String, SkinEntry>>, pub special_paths: AHashMap<Glob, SpecialHandling>, pub search_modes: Option<FnvHashMap<String, String>>, pub disable_mouse_capture: Option<bool>, pub capture_mouse: Option<bool>, pub cols_order: Option<ColsConf>, pub show_selection_mark: Option<bool>, pub ext_colors: AHashMap<String, String>, pub syntax_theme: Option<SyntaxTheme>, pub true_colors: Option<bool>, pub icon_theme: Option<String>, pub modal: Option<bool>, pub max_panels_count: Option<usize>, pub quit_on_last_cancel: Option<bool>, pub file_sum_threads_count: Option<usize>, pub max_staged_count: Option<usize>, pub imports: Vec<Import>, pub show_matching_characters_on_path_searches: Option<bool>, pub content_search_max_file_size: Option<u64>,
}
Expand description

The configuration read from conf.toml or conf.hjson 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<AHashMap<String, SkinEntry>>§special_paths: AHashMap<Glob, SpecialHandling>§search_modes: Option<FnvHashMap<String, String>>§disable_mouse_capture: Option<bool>

Obsolete, kept for compatibility: you should now use capture_mouse

§capture_mouse: Option<bool>§cols_order: Option<ColsConf>§show_selection_mark: Option<bool>§ext_colors: AHashMap<String, String>§syntax_theme: Option<SyntaxTheme>§true_colors: Option<bool>§icon_theme: Option<String>§modal: Option<bool>§max_panels_count: Option<usize>§quit_on_last_cancel: Option<bool>§file_sum_threads_count: Option<usize>§max_staged_count: Option<usize>§imports: Vec<Import>§show_matching_characters_on_path_searches: Option<bool>§content_search_max_file_size: Option<u64>

Implementations§

source§

impl Conf

source

pub fn default_location() -> PathBuf

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.

source

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

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

source

pub fn solve_conf_path(&self, path: &str) -> Option<PathBuf>

source

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

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§

source§

impl Clone for Conf

source§

fn clone(&self) -> Conf

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Conf

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Conf

source§

fn default() -> Conf

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

impl<'de> Deserialize<'de> for Conf

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for Conf

§

impl Send for Conf

§

impl Sync for Conf

§

impl Unpin for Conf

§

impl UnwindSafe for Conf

Blanket Implementations§

source§

impl<T> Any for Twhere
T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere
U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,

source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
source§

impl<T> ToOwned for Twhere
T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for Twhere
U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,