[][src]Struct kibi::Config

pub struct Config {
    pub tab_stop: usize,
    pub quit_times: usize,
    pub message_duration: Duration,
    pub show_line_num: bool,
    pub conf_dirs: Vec<PathBuf>,
}

The global Kibi configuration.

Fields

tab_stop: usize

The size of a tab. Must be > 0.

quit_times: usize

The number of confirmations needed before quitting, when changes have been made since the file was last changed.

message_duration: Duration

The duration for which messages are shown in the status bar.

show_line_num: bool

Whether to display line numbers.

conf_dirs: Vec<PathBuf>

The paths to directories that may be used to store Kibi configuration files.

Methods

impl Config[src]

pub fn load() -> Result<Self, Error>[src]

Load the configuration, potentially overridden using config.ini files that can be located in the following directories:

  • /etc/kibi (system-wide configuration).
  • $XDG_CONFIG_HOME/kibi if environment variable $XDG_CONFIG_HOME is defined, $HOME/.config/kibi otherwise (user-level configuration).

Errors

Will return Err if one of the configuration file cannot be parsed properly.

Auto Trait Implementations

impl RefUnwindSafe for Config

impl Send for Config

impl Sync for Config

impl Unpin for Config

impl UnwindSafe for Config

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> From<T> for T[src]

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

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.