[][src]Struct sheldon::Builder

pub struct Builder { /* fields omitted */ }

A builder that is used to construct a Sheldon with specific settings.

Settings are set using the "builder pattern". All settings are optional and may be given in any order. When the build() method is called the Builder is consumed, defaults are applied for settings that aren't given, and a Sheldon object is then generated.

Methods

impl Builder[src]

pub fn home<P>(self, home: P) -> Self where
    P: Into<PathBuf>, 
[src]

Set the current user's home directory.

If not given, this setting is determined automatically using dirs::home_dir(). You should only have to set this setting if your operating system is unusual.

This directory will be used to automatically determine defaults for other settings and to expand tildes in paths given in the config file.

pub fn root<P>(self, root: P) -> Self where
    P: Into<PathBuf>, 
[src]

Set the root directory.

If not given, this setting is determined using the following priority:

  • The value of the SHELDON_ROOT environment variable.
  • The .zsh directory in the home directory.

This directory will be used to automatically determine defaults for the config file and the lock file.

pub fn config_file<P>(self, config_file: P) -> Self where
    P: Into<PathBuf>, 
[src]

Set the location of the config file.

If not given, this setting is determined using the following priority:

  • The value of the SHELDON_CONFIG_FILE environment variable.
  • The plugins.toml file in the root directory.

This filename will be used to automatically determine the default location of the lock file.

pub fn lock_file<P>(self, lock_file: P) -> Self where
    P: Into<PathBuf>, 
[src]

Set the location of the lock file.

If not given, this setting is determined using the following priority:

  • The value of the SHELDON_LOCK_FILE environment variable.
  • The name of the config file with the extension replaced (or added) with .lock.

pub fn reinstall(self, reinstall: bool) -> Self[src]

Whether to reinstall plugin sources. This defaults to false.

pub fn relock(self, relock: bool) -> Self[src]

Whether to relock plugins even if a lock file is found. This defaults to false.

pub fn quiet(self, quiet: bool) -> Self[src]

Whether to suppress output. This defaults to false.

pub fn verbose(self, verbose: bool) -> Self[src]

Whether to enable verbose output. This defaults to false.

pub fn no_color(self, no_color: bool) -> Self[src]

Whether to output ANSI color codes. This defaults to false.

pub fn build(self) -> Sheldon[src]

Consume the Builder, apply default settings, and create a new Sheldon.

Trait Implementations

impl Default for Builder[src]

impl Debug for Builder[src]

Auto Trait Implementations

impl Send for Builder

impl Unpin for Builder

impl Sync for Builder

impl UnwindSafe for Builder

impl RefUnwindSafe for Builder

Blanket Implementations

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.

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

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

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

impl<T> Erased for T

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

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