[][src]Struct kibi::Config

pub struct Config {
    pub tab_stop: usize,
    pub quit_times: usize,
    pub message_dur: Duration,
    pub show_line_num: bool,
}

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_dur: Duration

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

show_line_num: bool

Whether to display line numbers.

Implementations

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:

  • On Linux, macOS, and other *nix systems:
    • /etc/kibi (system-wide configuration).
    • $XDG_CONFIG_HOME/kibi if environment variable $XDG_CONFIG_HOME is defined, $HOME/.config/kibi otherwise (user-level configuration).
  • On Windows:
    • %APPDATA%\Kibi

Errors

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

Trait Implementations

impl Debug for Config[src]

impl Default for Config[src]

fn default() -> Self[src]

Default configuration.

impl PartialEq<Config> for Config[src]

impl StructuralPartialEq for Config[src]

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.